iamDyeus / tkreload

auto reloads your tkinter app whenever file changes are detected 🐍
https://pypi.org/project/tkreload/
Apache License 2.0
7 stars 6 forks source link

[BUG] App Reloads Multiple Times Instead of Once When Auto-Reload is Enabled #12

Open iamDyeus opened 3 hours ago

iamDyeus commented 3 hours ago

Describe the bug In the demo GIF, the app reloads three times, whereas it should only reload once. This issue occurs specifically when auto-reload is enabled and needs to be addressed.

To Reproduce Steps to reproduce the behavior:

  1. Enable auto-reload.
  2. Make changes to sample_app.py while running it using tkreload.

Expected behavior The app should reload only once for each change, rather than three times.

Screenshots With tkreload

Additional context It might be worth increasing the time buffer after which file changes are monitored in main.py. Also, ensure that the relevant tests are updated accordingly after fixing this issue.

hriteshMaikap commented 2 hours ago

Hey! I tried to reproduce the bug. I have installed the dependcies as well. After running the following command: tkreload example/sample_app.py

I get the app running and the following output is displayed. Tkreload is running ✅

But when I make any change in the sample_app.py, I don't see the tkinter file reloading. Can you please elaborate where I may be wrong? Once I reproduce this error I think I can fix this bug.