Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

bug: issue with flet run --web on Raspberry Pi running Raspberry Pi OS Lite (Debian 13 Trixie)

Abierto Apto para principiantes
#6,984 1 comentario 0 reacciones 0 asignados Ver en GitHub

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
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
fastapi, python
Área
backend, web-dev

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

bug
Duplicate Check
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
  1. On a headless Linux system, create a folder and enter into it
  2. Create a Python virtual env, python -m venv .venv
  3. Activate the virtual env, source .venv/bin/activate
  4. Install flet, pip install 'flet[all]'
  5. Run flet create
  6. 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 Image Image
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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de flet-dev/flet

Todos los issues de flet-dev/flet

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.