flet
flet copied to clipboard
Please note, it is a fatal bug! In versions 0.12.2 and 0.17.0 (and maybe all versions 0.12.2 to 0.17.0) when using did_mount, the window cannot be opened again after being minimized
Please note, it is a fatal bug! In versions 0.12.2 and 0.17.0 (and maybe all versions 0.12.2 to 0.17.0) when using did_mount, the window cannot be opened again after being minimized. But there is no such bug in versions 0.12.1 and below.
Code example to reproduce the issue:
import flet as ft
import time, threading
class Countdown(ft.UserControl):
def __init__(self, seconds):
super().__init__()
self.seconds = seconds
def did_mount(self):
self.running = True
self.th = threading.Thread(target=self.update_timer, args=(), daemon=True)
self.th.start()
def will_unmount(self):
self.running = False
def update_timer(self):
while self.seconds and self.running:
mins, secs = divmod(self.seconds, 60)
self.countdown.value = "{:02d}:{:02d}".format(mins, secs)
self.update()
time.sleep(1)
self.seconds -= 1
def build(self):
self.countdown = ft.Text()
return self.countdown
def main(page: ft.Page):
page.add(Countdown(120), Countdown(60))
ft.app(target=main)
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Flet version (pip show flet):
Name: flet
Version: 0.12.2
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page:
Author: Appveyor Systems Inc.
Author-email: [email protected]
License: Apache-2.0
Location: d:\b\code\python\novamss\venv-cpu\lib\site-packages
Requires: cookiecutter, flet-runtime, packaging, qrcode, watchdog, websocket-client, websockets
Required-by:
Operating system: Windows
Additional environment details:
unfortunately, this bug also applies to "clean" flet window, someone on discord mentioned this bug but unfortunately this error affects only a few people ( including me )
unfortunately, this bug also applies to "clean" flet window, someone on discord mentioned this bug but unfortunately this error affects only a few people ( including me )
However, this bug is likely to affect all versions from 0.12.2 to 0.17.0. I think this is a very serious problem and I hope the author can pay attention to it. Because of this problem, I had to roll back from 0.17.0 to version 0.12.1
so maybe you could write about this bug on discord, maybe one of devs will fix it if you mention it again
I also happend this trouble
so maybe you could write about this bug on discord, maybe one of devs will fix it if you mention it again
I have already written once on discard, but no one responded. I will continue to write.
I also happend this trouble
It seems that many people have encountered this problem
The only thing I know about this bug is that this bug is random ( sometimes it happens and sometimes it doesn't ) and that it only affects windows users
The only thing I know about this bug is that this bug is random ( sometimes it happens and sometimes it doesn't ) and that it only affects windows users
The above code is directly copied from the flet document. this bug is always appear in my env.
Any updates on this issue? @FeodorFitsner It happens more and more frequently to me now.
Any updates on this issue? @FeodorFitsner It happens more and more frequently to me now.
@FeodorFitsner Hi, Are you hava any idea of this bug? Looking forward to your reply!Thanks