-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when making asynchronous requests in Pyodide
#4926
Comments
20250220-1725-05.8885035.mp4It seems I’ve found the issue and recorded it on video. As mentioned in #4840, the temporary solution is to simply change the version in the link. However, after launching, the first run works fine, but then it reverts to the version that is currently available in Flet. I didn’t capture this on video, but I suspect that it also overwrites the
I’m confident that this issue will be resolved after the next update (#4840), but I suspect that the fact that |
Are you running |
yes |
Right, then contents of |
Duplicate Check
Describe the bug
I don’t fully understand this issue. In problem #4840, it was discovered that Pyodide in Flet needs to be updated to resolve certain issues. I’m currently waiting for that update, and in the meantime, I applied a temporary solution to keep my project running.
This temporary solution worked initially, but after a while, I started encountering this error (as shown in the picture). The error occurs when I try to make requests to the server using httpx. It seems like the issue could be related to the way Pyodide handles requests or asynchronous tasks, but I'm not sure what exactly is causing it.
The error in the picture is from a working project inside a try-except block. Below, I show the same error without the try-except block, along with minimal code to reproduce it:
Code sample
main.py
requirements.txt
To reproduce
flet publish
Change the Pyodide version in
python-worker.js
python.exe -m http.server 8080 --bind 127.0.0.1 --directory dist
if linux system:
python3 -m http.server 8080 --bind 127.0.0.1 --directory dist
Operating System
Windows
Operating system details
Windows 11 22H2
Flet version
0.26.0x
Regression
I'm not sure / I don't know
The text was updated successfully, but these errors were encountered: