flet icon indicating copy to clipboard operation
flet copied to clipboard

bug: `flet run -dw main.py` crashes the program

Open taaaf11 opened this issue 2 months ago • 1 comments

Duplicate Check

  • [x] I have searched the opened issues and there are no duplicates

Describe the bug

When I want to run on flet run using flet run -dw main.py , the program crashes.

Code sample

Code
import flet as ft


def main(page):
    page.add(ft.Text("Hello"))


ft.app(main)

To reproduce

  1. Run the repro code
  2. It crashes

Expected behavior

I expected the "Hello" text appear in my browser through flet app (normal behavior).

Screenshots / Videos

Captures

[Upload media here]

Operating System

Windows

Operating system details

Windows 11 24H2

Flet version

0.28.3

Regression

I'm not sure / I don't know

Suggestions

No response

Logs

Logs
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Altaaf\my-porfolio\.venv\Scripts\flet.exe\__main__.py", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File "C:\Users\Altaaf\my-porfolio\.venv\Lib\site-packages\flet\cli.py", line 11, in main
    flet_cli.cli.main()
    ~~~~~~~~~~~~~~~~~^^
  File "C:\Users\Altaaf\my-porfolio\.venv\Lib\site-packages\flet_cli\cli.py", line 93, in main
    args.handler(args)
    ~~~~~~~~~~~~^^^^^^
  File "C:\Users\Altaaf\my-porfolio\.venv\Lib\site-packages\flet_cli\commands\run.py", line 144, in handle      
    from flet_desktop import close_flet_view
ModuleNotFoundError: No module named 'flet_desktop'

Additional details

No response

taaaf11 avatar Nov 17 '25 15:11 taaaf11