OpenMV IDE Import Error

Hi, I can’t run the app with ecomain.py. There is “ImportError: no module named 'urequests”. I am using OpenMV Cam H7 Plus.
Please guide me to help me solve this problem?
Thanks in advance.

It’s called requests now.


Thank you for your answer, it works. But there’s some new error. I have this error: “OSError: [Errno 19] ENODEV” . which seemly in ecofunctions.py, line 137 in save_variables “with open(‘/VAR/currentfolder.txt’. ‘w’) as folder log:”

I had tried to erase the onboard flash drive. but it doesn’t work.
What’s wrong?

It means the file is not found.

Does the VAR folder exist?

Yes, the VAR folder is available.

What do you think I should do to fix this?

Not sure, I just tried this:

with open("stuff.txt", "w") as f:
    f.write("Hello world!\n")
    f.write("This is a test.\n")
    f.write("Goodbye world!\n")

and

with open("VAR/stuff.txt", "w") as f:
    f.write("Hello world!\n")
    f.write("This is a test.\n")
    f.write("Goodbye world!\n")

And things work as expected. Note that you need to reset the camera to see the file on the PC. As for the VAR folder. Make sure to reset the camera after creating it from the desktop if you created it from the desktop to ensure it gets written to disk.

Do you have an SD card attached? The internal flash space is limited.

yes, I have the SD card.

Thank you, it’s work :smiley: