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

child Window Don't can use meter #593

Open
gtgor opened this issue Jul 24, 2024 · 1 comment
Open

child Window Don't can use meter #593

gtgor opened this issue Jul 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@gtgor
Copy link

gtgor commented Jul 24, 2024

Desktop (please complete the following information):

I needed to use meter in a child window, and the program threw an error, which I assumed was due to a default conflict

Describe the bug

Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\tkinter_init_.py", line 1921, in call
return self.func(*args)
File "C:\Projects\alloy\venv\lib\site-packages\ttkbootstrap\widgets.py", line 953, in _on_theme_change
self._draw_base_image()
File "C:\Projects\alloy\venv\lib\site-packages\ttkbootstrap\widgets.py", line 862, in _draw_base_image
self._set_widget_colors()
File "C:\Projects\alloy\venv\lib\site-packages\ttkbootstrap\widgets.py", line 773, in _set_widget_colors
self._meterbackground = Colors.update_hsv(background, vd=-0.1)
File "C:\Projects\alloy\venv\lib\site-packages\ttkbootstrap\style.py", line 369, in update_hsv
r, g, b = Colors.hex_to_rgb(color)
File "C:\Projects\alloy\venv\lib\site-packages\ttkbootstrap\style.py", line 317, in hex_to_rgb
r, g, b = colorutils.color_to_rgb(color)
TypeError: cannot unpack non-iterable NoneType object

To Reproduce

I managed to repeat the mistake in a new dame

import ttkbootstrap as ttk
def windows1():
root=ttk.Window()
ttk.Button(root,command=lambda : windows2()).pack()
root.mainloop()

def windows2():
win=ttk.Window()
ttk.Meter(win).pack()
win.mainloop()
windows1()

Expected behavior

In general, mater can be successfully deployed on win

Screenshots

No response

Additional context

No response

@gtgor gtgor added the bug Something isn't working label Jul 24, 2024
@gtgor
Copy link
Author

gtgor commented Jul 24, 2024

windows11 python3.10

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

No branches or pull requests

1 participant