Open TriDEntApollO opened 1 year ago
I am having the same error while running the code on a Jupyter Notebook, it works fine on a normal .py file. Any solution?
I still haven't found any fix to the issue but i have seen this issue mostly occurs on Spyder or Jupiter notebook it's something with the ide/editor using their own shell rather use the global system shell/terminal
This probably won't be of much help but you can try also the issue is raised only when a previous window was created but not destroyed so you could try destroying the previous window first as tkinter only allows one root window at a time.
On Mon, 2 Jan 2023, 2:47 pm Swastik Kulshreshtha, @.***> wrote:
I am having the same error while running the code on a Jupyter Notebook, it works fine on a normal .py file. Any solution?
— Reply to this email directly, view it on GitHub https://github.com/TomSchimansky/CustomTkinter/issues/822#issuecomment-1368767908, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHGKDHYUJ7COCZTWOSARPLWQKMJTANCNFSM6AAAAAAS2KDJAE . You are receiving this because you authored the thread.Message ID: @.***>
I am working on pycharm so the error is not Spyder specific as some were saying on stackoverflow. i tries runnign the program on the global system terminal still the same error.
Code
The class is used to create a eye button that hides and unhides password inside the CTkEntry box. Previously it used to work fine unless i added a loading screen before the login screen that gets destroyed inside the login_box function via a thread (the ConnectionWin) but since the button is initilized before the window gets destroyed it trows the following error.
Error
I tried decreasing the after() time for destroying the window but that results in another RuntimError mainthread is not inside mainloop and i also tried to disable the garbage collector so that it doesnt collect the vraible data and clear it by doing
g.disable()
and checked the gc state bygc.isenabled()
which returned false but still the same error.Code to replicate the error
Use a basic server to accept the connection to initiate the login window
Server code to accept the connection