
After the hot reload the function stops and need to reload with this error

is this python?

Yes

I would add flask to the requirements.txt

usually they add flask

Ok I will try it

appwrite==5.0.3
pykalman=0.9.7
numpy=1.26.2
python-json-logger==2.0.4
requests=2.32.3
hmmlearn=0.3.2
Flask==1.0.2
didn't help

Can I see your folder structure?


<@254968266462593026> and if you run main.py it works?

yes

possibly its not the function missing Flask, its the runtime itself missing the dependency it seems. cc <@287294735054274560> ideas?

python runtime also uses Flask=2.0.1, not sure if thats relevant.

current way is to stop and restart the function in local

any workaround or solutions
Info: Hot-swapping function.. Files with change are src\main.py Preparing for start ... ✓ Success: Visit http://localhost:3000/ to execute your function. Starting ... Traceback (most recent call last): File "/usr/local/server/src/server.py", line 4, in <module> from flask import Flask, request, Response as FlaskResponse ModuleNotFoundError: No module named 'flask'

When I tried to use your requirements.txt, I faced this error during build:
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
+ meson setup /tmp/pip-install-_d9jrzfm/scipy_3c6ad6120afb4ad38b35924c90b89290 /tmp/pip-install-_d9jrzfm/scipy_3c6ad6120afb4ad38b35924c90b89290/.mesonpy-0a9y32uq -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-_d9jrzfm/scipy_3c6ad6120afb4ad38b35924c90b89290/.mesonpy-0a9y32uq/meson-python-native-file.ini
The Meson build system
Version: 1.5.2
Source dir: /tmp/pip-install-_d9jrzfm/scipy_3c6ad6120afb4ad38b35924c90b89290
Build dir: /tmp/pip-install-_d9jrzfm/scipy_3c6ad6120afb4ad38b35924c90b89290/.mesonpy-0a9y32uq
Build type: native build
Project name: scipy
Project version: 1.13.1
../meson.build:1:0: ERROR: Unknown compiler(s): [['cc'], ['gcc'], ['clang'], ['nvc'], ['pgcc'], ['icc'], ['icx']]
The following exception(s) were encountered:
Running `cc --version` gave "[Errno 2] No such file or directory: 'cc'"
Running `gcc --version` gave "[Errno 2] No such file or directory: 'gcc'"
Running `clang --version` gave "[Errno 2] No such file or directory: 'clang'"
Running `nvc --version` gave "[Errno 2] No such file or directory: 'nvc'"
Running `pgcc --version` gave "[Errno 2] No such file or directory: 'pgcc'"
Running `icc --version` gave "[Errno 2] No such file or directory: 'icc'"
Running `icx --version` gave "[Errno 2] No such file or directory: 'icx'"
A full log can be found at /tmp/pip-install-_d9jrzfm/scipy_3c6ad6120afb4ad38b35924c90b89290/.mesonpy-0a9y32uq/meson-logs/meson-log.txt
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
What version of Python are you using?

With that said, I am facing problem with hot-swapping too:
ℹ Info: Hot-swapping function.. Files with change are src/main.py
Error: ENOENT: no such file or directory, stat '/Users/matejbaco/Desktop/delme/ppp/functions/66f3e3620000e6ea13d4/.appwrite/hot-swap/runtime-env/bin/python'
at Object.statSync (node:fs:1659:25)
at getAllFiles (/Users/matejbaco/.nvm/versions/node/v21.7.1/lib/node_modules/appwrite-cli/lib/utils.js:12:16)
at getAllFiles (/Users/matejbaco/.nvm/versions/node/v21.7.1/lib/node_modules/appwrite-cli/lib/utils.js:13:27)
at getAllFiles (/Users/matejbaco/.nvm/versions/node/v21.7.1/lib/node_modules/appwrite-cli/lib/utils.js:13:27)
at getAllFiles (/Users/matejbaco/.nvm/versions/node/v21.7.1/lib/node_modules/appwrite-cli/lib/utils.js:13:27)
at getAllFiles (/Users/matejbaco/.nvm/versions/node/v21.7.1/lib/node_modules/appwrite-cli/lib/utils.js:13:27)
at EventEmitter.<anonymous> (/Users/matejbaco/.nvm/versions/node/v21.7.1/lib/node_modules/appwrite-cli/lib/commands/run.js:258:37) {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/matejbaco/Desktop/delme/ppp/functions/66f3e3620000e6ea13d4/.appwrite/hot-swap/runtime-env/bin/python'
}

Let's please open GitHub issue for this 🙏

ok , But I am using the ML runtime

this error dont not come in the ML runtime
Running cc --version
gave "[Errno 2] No such file or directory: 'cc'"
Running gcc --version
gave "[Errno 2] No such file or directory: 'gcc'"
Running clang --version
gave "[Errno 2] No such file or directory: 'clang'"
Running nvc --version
gave "[Errno 2] No such file or directory: 'nvc'"
Running pgcc --version
gave "[Errno 2] No such file or directory: 'pgcc'"
Running icc --version
gave "[Errno 2] No such file or directory: 'icc'"
Running icx --version
gave "[Errno 2] No such file or directory: 'icx'"
Recommended threads
- 404 error when navigating to the team fr...
the version i m running is `1.7.4` as far as i can tell everything is working fine except for this weird bug in the video. when monitoring the appwrite and app...
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
- Relationship null, even when relationshi...
Hi Everyone, im experiencing issues with set relation data. When im setting the document id from the related database most of them seem fine, except one table. ...
