Back

[CLOSED] ModuleNotFoundError: No module named 'appwrite' problem

  • 0
  • Self Hosted
  • Functions
  • Tools
muratdoglu
17 Sep, 2023, 09:11

Hi, I reinstall my server, then I recreate project. Updated my functions codes ' keys. I can run my functions on my computer with visual studio code. I can connect server.

But, When I upload my code, some function on panel. When ı execute, ı have this problem Traceback (most recent call last): File "/usr/local/server/src/server.py", line 165, in handler 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 150, 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/src/index.py", line 2, in <module> from appwrite.client import Client ModuleNotFoundError: No module named 'appwrite'

TL;DR
User is encountering a ModuleNotFoundError when trying to import the 'appwrite' module in their code. They have tried uploading a requirements.txt file but it didn't solve the issue. They also attempted installing the 'jwt' module but still got the error. They have installed the necessary modules on their computer and are able to run the code successfully locally, but when they upload it to the server, they encounter the error. No solution is provided in the thread.
muratdoglu
17 Sep, 2023, 09:31

I try other my function ModuleNotFoundError: No module named 'jwt'

muratdoglu
17 Sep, 2023, 09:31

I think I have to install modules, but how ?

muratdoglu
17 Sep, 2023, 09:32

I use pip install jwt, it completed but error agian

muratdoglu
17 Sep, 2023, 11:40

up

D5
17 Sep, 2023, 12:14

@muratdoglu What's your function code?

muratdoglu
17 Sep, 2023, 13:22

I changed metod. I will open new question

Drake
18 Sep, 2023, 16:53

[CLOSED] ModuleNotFoundError: No module named 'appwrite' problem

antonio84
14 Oct, 2023, 16:44

How have you fixed, I am getting that error even uploading the requirements.txt file

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