0

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.

  • Your code works for me, I suspect this is a package version problem - I've encountered a few before. What version of Python and Flet are you using? Are you using a virtual environment? – GooJ May 04 '23 at 20:13
  • Python - 11.3.1; Flet - 0.6.2. I'm not using a Virtual Env. Also, I have a point that the following code also runs on my PC (the problem occurred on my laptop) – Dmytro Lavryk May 05 '23 at 08:01
  • Hmm, not 100% sure on the fix, but check the flet and Python versions you are using on your laptop are the same. I'd use a virtual environment. Try an older flet build like flet 0.4 and python 3.7 as part of your debugging – GooJ May 06 '23 at 13:31
  • Thanks! I will try. Mind that's something wrong with laptop settings... But anyway try your option. – Dmytro Lavryk May 07 '23 at 19:11

1 Answers1

0

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.