Search code examples
pythonflet

Running Flet App is invoke the Thread Exception


I'm trying to run the start-up lines of code for Python Flet Library

import flet as ft


def main(page: ft.Page):
    pass


ft.app(target=main)

but during it's running this exception is occurred:

Exception in thread Thread-1 (__connection_loop):
Traceback (most recent call last):
  File "..\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner

I'm trying to run the program like the Web App and it's work.


Solution

  • The best option for me was to reinstall the Windows. It was something broken at the system so after reinstalling this error is not occurred.