I've recently created a Card with MotionEyeOS for the Raspberry Pi. I've tested motioneyeos already on DietPi and the normal Raspbian, but it didnt worked with the original Raspberry Pi-Camera.

In a previous Project i've written a Python-Application which should notify me via Telegram when someone sneeks in my room. It was very laggy - thats the reasyon, why i would like to use MotionEyeOS.

Now, i would like to execute a small Python-Script which sends Notifications by Telegram when MotionEyeOS finds an motion.

The minor problem is, that i get the following Error:

Traceback (most recent call last):
  File "notify.py", line 5, in <module>
    import requests
ImportError: No module named requests

Do someone have a hint for me, how i could solve the problem and execute the script in this Operating-System?

  • python could not find a module named "requests". Are you sure there is such a module "requests.py" in the same directory where your program is running?
    – tlfong01
    Jun 27 '19 at 7:01
  • @tlfong01 there should not be a requests.py file in the same directory. requests is a 3rd party module that is used in many actions that have to connect to the internet. (pip / pi3 use it for example).
    – Dirk
    Jun 27 '19 at 8:03
  • @Dirk, Ah I must confess that I am ignorant about the "request.py" module. I am only thinking or troubleshooting as a python newbie. In my very limited python programming experience, I place all the modules I am going to import in the same directory, and all goes well. Of course this is a newbie thinking. I guess there must be some way of telling python the path of the request module, say "import home/.../.../requests.py", or something more clever. Thank you for pointing out my python newbie mistake. I need to google further. My apologies of possibly misleading the OP.
    – tlfong01
    Jun 27 '19 at 8:14
  • 1
    @Dirk. I have never heard of the "MotionEyeOS". I guess this is sort of a camera package. Just now I skimmed the python 3.5 import document (see me reading notes - penzu.com/p/8395f604 ). The python import system is rather comoplicated. I guess the OP might need to read the MotionEyeOS manual and find where the package is placed in Rpi, and then use the import statement something as import <OPEYESOS PATH>. request.py. Or need to tell where is request.py is located in some default directory etc. Anyway, a bit too advanced for me.
    – tlfong01
    Jun 27 '19 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.