Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
ModuleNotFoundError when run from External Files
-
If I try and run programs from an external file, it gives me a ModuleNotFoundError, even though the module is in the same folder and it runs perfectly from my Mac. For example,
File 1: (dummy.py) has this line:
print('Hello')File 2: (dummy2.py) has this line:
import dummyWhen I run File 2, on my Mac I get 'Hello' printed. On Pythonista, I get ModuleNotfoundError.
Can someone help me understand what is going on?
-
@maxelon for me, it works. Be sure no uppercase and in same folder
-
Definitely no upper case and in the same folder, and it does works from my Mac. I can also make it work from Pythonista’s iCloud Script Library area, just not from a folder accessed by External Files.
-
@maxelon ok, sorry, I didn't read it correctly. It is normal, your import would no access your external folder.
-
@maxelon it works, if:
- I rename both .py into mydummy and mydummy2 (perhaps is dummy system reserved)
- I put both files in iCloud Drive/test folder (not Pythonista3 iCloud)
- I open external folder test
- I run mydummy2
-