Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOT RELOAD (flet==0.10.3) #1975

Closed
itsmeadarsh2008 opened this issue Oct 20, 2023 · 3 comments
Closed

HOT RELOAD (flet==0.10.3) #1975

itsmeadarsh2008 opened this issue Oct 20, 2023 · 3 comments

Comments

@itsmeadarsh2008
Copy link

Description
I'm experiencing a problem with Hot Reload with the latest version (flet==0.10.3)

I think we need to change the timeout i.e. delay while the watchdog reloads the app when the app file is changed (the time interval). I think it's a watchdog bug. Try degrading the current watchdog version.
Code example to reproduce the issue:

import flet as ft
import random


def main(page: ft.Page):
    page.title = "TrainBrain"
    page.window_width = 500
    page.vertical_alignment = ft.MainAxisAlignment.CENTER
    page.add(
        ft.Row(
            [
                ft.ElevatedButton(random.randint(-23, 115)),
                ft.ElevatedButton(random.randint(-23, 115)),
                ft.ElevatedButton(random.randint(-23, 115)),
                ft.ElevatedButton(random.randint(-23, 115))
            ],
            alignment=ft.MainAxisAlignment.CENTER,
        )
    )


ft.app(target=main)

Describe the results you received:
On changing the source file it shows this kind of hot-reload bug.
image

Describe the results you expected:
image

Additional information you deem important (e.g. issue happens only occasionally):
It shows a buffer all the time.
Flet version (pip show flet):

Name: flet
Version: 0.10.3
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page: 
Author: Appveyor Systems Inc.
Author-email: hello@flet.dev
License: Apache-2.0
Location: D:\TrainBrain\environment\Lib\site-packages
Requires: copier, flet-runtime, packaging, qrcode, watchdog, websocket-client, websockets
Required-by: 

Operating system:
Windows
(Other people are facing the same issue in Linux or maybe in Mac)
Additional environment details:

@FeodorFitsner
Copy link
Contributor

What timeout do you mean - could you point me to a place within the code?

@itsmeadarsh2008
Copy link
Author

@FeodorFitsner It's not about AFK. I'm referring to the time delay between code execution in watchdog file change

@ndonkoHenri
Copy link
Collaborator

Closing in favour of #1556

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants