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
- NEW ERROR Invalid document structure: At...
Error: ```AppwriteException: document_invalid_structure, Invalid document structure: Attribute "pb.kmsgxPkgInfo.id_info" must be an array (400)``` I’m encounter...
- Issues with executor in Appwrite 1.9.0
Hi, I’ve recently did a fresh install of appwrite 1.9.0 self hosted and when I run a function, it just waits indefinite This is the error from the log: [Er...
- Issues with Appwrite and networking
Hi, I’ve been having some real issues with hosting appwrite, I have it running with the hostname ‘localhost’ and I used to also be able to use the machines IP ...