I created an appwrite function from cli
on executing python function:
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 1, in <module>
from appwrite.client import Client
ModuleNotFoundError: No module named 'appwrite'```
I ran the template code only, it has `appwrite` in requirements.txt
guys help pleaseπ
what version of the CLI do you have? and what version of Appwrite?
appwrite -v gives: 1.2.1
And your version of Appwrite?
"appwrite": "^13.0.0"
No, not your Appwrite SDK. The appwrite instance version
Oh you mean this- Version 1.4.13
Your CLI is old compared to your appwrite version. maybe you can delete your function, upgrade your CLI and then initialize again
whats the command to upgrade cli?
i couldnt find in docs;-;
Do i just-
yarn global add appwrite-cli@latest?
Yes if you installed via yarn before
now I have 4.2.0
im getting Incorrect string value: '\xE2' for column 'logs' at row 1
on deploying
what's your new code and what are the settings for your function?
Recommended threads
- functions returning error 401 in local
I updated to 1.9.0, and the functions that used to work fine in 1.8.1 are now giving me a 401 error. I can't seem to find a solution. If anyone is running versi...
- router_deployment_not_found
I updated my function a few times and now i am getting the error: router_deployment_not_found I even reverted back to my original code but i am still getting th...
- Cloud function deploy stucks in processi...
Been trying for the last hours to deploy my function but for whatever reason, alwasy stuck on processing!