
My main function is named main.py but I also have a utility.py (in the same directory) for my function.
For testing, my utility.py only contains: def simple_test(): print("Simple test function in utility.py")
In my main.py, I am trying to import with: from utility import simple_test
But it fails during exectution with: File "/usr/local/server/src/function/main.py", line 18, in <module> from utility import simple_test ModuleNotFoundError: No module named 'utility'
What is the correct syntax for importing from a separate file?
Recommended threads
- I am facing this error: type 'Null' is ...
When attempting to fetch areas from the area collection, the application throws an error: "type 'Null' is not a subtype of type 'int.'" This issue originates in...
- Adding Domain to Sites [Self Hosted]
I am struggling to get this working. I stood-up a new server and deployed appwrite 1.7.4. I added update .env file _APP_DOMAIN=appwrite.mydomain.com _APP_DOMAI...
- Need help migrating from self hosted to ...
Hi! I am using self hosted appwrite for testing stuff out and now it's prod ready I want to deplot it to the cloud version. It gave me this error when fetchin...
