Back

Can’t run functions

  • 1
  • Flutter
Vikram
16 Aug, 2024, 17:40

Traceback (most recent call last): File "/usr/local/server/src/server.py", line 163, in action output = await asyncio.wait_for(execute(context), timeout=safeTimeout) File "/usr/local/lib/python3.9/asyncio/tasks.py", line 479, in wait_for return fut.result() File "/usr/local/server/src/server.py", line 148, in execute userModule = importlib.import_module("function." + userPath) File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 850, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/usr/local/server/src/function/main.py", line 2, in <module> from appwrite.client import Client ModuleNotFoundError: No module named 'appwrite'

Facing this issue despite appwrite being mentioned in requirements.txt

TL;DR
Developers are unable to run functions due to a ModuleNotFoundError for 'appwrite' despite it being in the requirements.txt file. The issue lies in the import_module function. Make sure 'appwrite' is correctly installed in the Python environment where functions are being executed to resolve the problem.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more