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

bgerror failed to handle background error #565

Open
UTexasRepo opened this issue Apr 16, 2024 · 1 comment · May be fixed by #606
Open

bgerror failed to handle background error #565

UTexasRepo opened this issue Apr 16, 2024 · 1 comment · May be fixed by #606
Labels
bug Something isn't working

Comments

@UTexasRepo
Copy link

Desktop (please complete the following information):

ttkbootstrap Version [e.g. 1.10.1]
OS: [e.g. Windows]

Describe the bug

I ran a simple app and am receiving bg error when I exit the program.

To Reproduce

A No Frills superhero theme

from tkinter import *
from ttkbootstrap.constants import *
import ttkbootstrap as tb

root = tb.Window(themename = "superhero")
root.title("TTK Bootstrap!")
root.geometry('500x350')

root.mainloop()

Expected behavior

When I exit the program, I do not expect this behavior.

Screenshots

The application runs fine
image

The application when exited, producing the following error:
image

Additional context

No response

@UTexasRepo UTexasRepo added the bug Something isn't working label Apr 16, 2024
@mcmanustfj
Copy link

mcmanustfj commented Nov 26, 2024

this happens because the ttkbootstrap Style singleton isn't reset when the window is destroyed, and tries to use the same window that was already destroyed. You can fix this by setting ttkbootstrap.Style.instance = None before recreating the new window. My PR fixes it, but who knows when it'll go in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants