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
- Excessive usage of cloud functions is sl...
I have made almost all my requests through cloud functions and jwt , due to security fears of a user editing a field he is not supposed to . This unfortunately...
- Dart Runtime as Function is missing
Hey guys, I set the _APP_FUNCTIONS_RUNTIMES to dart-3.10 and redeployed the appwrite stack but unfortunately the dart runtime doesnt show up. I copied the val...
- Go 1.25 runtime
So I'm trying to use go 1.25 for my functions and I can only find go-1.23 as a function runtime. So I did some searching and found https://github.com/appwrite/a...