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
- Function connected custom domain error: ...
My domain is served through Cloudflare. Domain is now connected with the appwrite function. But when accessing the domain, I get the below error. Any suggestion...
- Error | general_unknown
I have built a website using Appwrite Cloud as backend, and also using sites for deployment. My website is live but sometimes it shows Appwrite's Error general_...
- Invalid token passed in the request
Hello, I have an issue using updateMagicURLSession. I send the email using sendMagicLink, which works fine. When i click the link in the email i get the invali...