bug: issue with flet run --web on Raspberry Pi running Raspberry Pi OS Lite (Debian 13 Trixie)
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 68/100
Línea de trabajo
Empieza con el traceback en flet_web/fastapi/flet_fastapi.py:117 y comprueba la versión de la dependencia FastAPI instalada por pip install 'flet[all]' en Python 3.13. El error informado es un argumento inesperado openapi_prefix cuando flet run --web crea la aplicación FastAPI; confirma el comportamiento compatible de la dependencia y reproduce el error con el ejemplo de chat en Debian 13 aarch64. El trabajo estará terminado cuando la aplicación se inicie y se cargue en un navegador con la configuración informada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Duplicate Check
- I have searched the opened issues and there are no duplicates
Describe the bug
I have a locally hosted Flet application on a raspberry pi running headless raspberry pi os, but when I run the application using flet run --web, I receive this error:
Traceback (most recent call last):
File "/path/to/python/flet_apps/src/main.py", line 26, in <module>
ft.run(main)
~~~~~~^^^^^^
File "/path/to/python/flet_apps/.venv/lib/python3.13/site-packages/flet/app.py", line 133, in run
return asyncio.run(
~~~~~~~~~~~^
run_async(
^^^^^^^^^^
...<11 lines>...
)
^
)
^
File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/path/to/python/flet_apps/.venv/lib/python3.13/site-packages/flet/app.py", line 282, in run_async
conn = await __run_web_server(
^^^^^^^^^^^^^^^^^^^^^^^
...<11 lines>...
)
^
File "/path/to/python/flet_apps/.venv/lib/python3.13/site-packages/flet/app.py", line 627, in __run_web_server
return await serve_fastapi_web_app(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<13 lines>...
)
^
File "/path/to/python/flet_apps/.venv/lib/python3.13/site-packages/flet_web/fastapi/serve_fastapi_web_app.py", line 129, in serve_fastapi_web_app
app = flet_web.fastapi.FastAPI(on_startup=[startup])
File "/path/to/python/flet_apps/.venv/lib/python3.13/site-packages/flet_web/fastapi/flet_fastapi.py", line 117, in __init__
super().__init__(
~~~~~~~~~~~~~~~~^
debug=debug,
^^^^^^^^^^^^
...<33 lines>...
**extra,
^^^^^^^^
)
^
TypeError: FastAPI.__init__() got an unexpected keyword argument 'openapi_prefix'
Code sample
Code
I used the given chat application example
To reproduce
- On a headless Linux system, create a folder and enter into it
- Create a Python virtual env,
python -m venv .venv - Activate the virtual env,
source .venv/bin/activate - Install flet,
pip install 'flet[all]' - Run
flet create - Copy the chat example and replace it with the contents of
src/main.py
Expected behavior
Expect to see the app load in the browser
Screenshots / Videos
Captures
Operating System
Linux
Operating system details
Debian GNU/Linux 13 (trixie) aarch64
Flet version
1.0.4
Regression
Yes, it used to work in a previous Flet version (please specify the version in additional details)
Suggestions
I suspect the reason the issue is arising is due to the fact that the web/ directory is missing in the .venv/lib/python3.13/site-packages/flet_web/ folder. Is the directory not present have to do with the fact that Raspberry Pi OS is running headless? My daily laptop does have that web/ directory present and flet run --web works fine.
Logs
Logs
Traceback (most recent call last):
File "/path/to/python/flet_apps/src/main.py", line 26, in <module>
ft.run(main)
~~~~~~^^^^^^
File "/path/to/python/flet_apps/.venv/lib/python3.13/site-packages/flet/app.py", line 133, in run
return asyncio.run(
~~~~~~~~~~~^
run_async(
^^^^^^^^^^
...<11 lines>...
)
^
)
^
File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/path/to/python/flet_apps/.venv/lib/python3.13/site-packages/flet/app.py", line 282, in run_async
conn = await __run_web_server(
^^^^^^^^^^^^^^^^^^^^^^^
...<11 lines>...
)
^
File "/path/to/python/flet_apps/.venv/lib/python3.13/site-packages/flet/app.py", line 627, in __run_web_server
return await serve_fastapi_web_app(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<13 lines>...
)
^
File "/path/to/python/flet_apps/.venv/lib/python3.13/site-packages/flet_web/fastapi/serve_fastapi_web_app.py", line 129, in serve_fastapi_web_app
app = flet_web.fastapi.FastAPI(on_startup=[startup])
File "/path/to/python/flet_apps/.venv/lib/python3.13/site-packages/flet_web/fastapi/flet_fastapi.py", line 117, in __init__
super().__init__(
~~~~~~~~~~~~~~~~^
debug=debug,
^^^^^^^^^^^^
...<33 lines>...
**extra,
^^^^^^^^
)
^
TypeError: FastAPI.__init__() got an unexpected keyword argument 'openapi_prefix'
Additional details
No response
- Lenguaje dominante
- Python
- Estrellas
- 17.4k
- Forks
- 728
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 58
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de flet-dev/flet
-
feature: python 3.15 supportAbiertofeature request
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
flet build: common [tool.flet.deep_linking] is ignored on Android and iOSPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug packaging platform: mobile
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 2 días
Todos los issues de flet-dev/flet
Issues similares
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
selimfirat/pysad#379 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
open-webui/open-webui#32805 ·
Los mantenedores suelen responder en 1 día
-
fix: [bug description] HTML CVE metric table shows only the last CVE for each productPosiblemente ocupada @Chris-wh233 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
ossf/cve-bin-tool#5976 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
gke-labs/kube-agents#3615 ·
Los mantenedores suelen responder en 1 día
-
deferred
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día