CustomTkinter
CustomTkinter copied to clipboard
Internal error while (re)rendering widgets
customtkinter 5.2.2
Windows 10 Version 10.0.19045 Build 19045
I couldn't reliably reproduce the error, but it gets thrown occasionally whenever the UI dynamically changes, such as pressing a button or showing/hiding widgets.
Is is similar to #1006, but I am using no threads explicitly, but the .after() method.
Update: I've found out that the error gets thrown when wigets overlap when they shouldn't. Resizing my window or intentionally overflowing a text box can cause the error to be thrown reliably.
Traceback (most recent call last):
File "\Lib\tkinter\__init__.py", line 1962, in __call__
return self.func(*args)
^^^^^^^^^^^^^^^^
File "\Lib\site-packages\customtkinter\windows\widgets\core_widget_classes\ctk_base_class.py", line 188, in _update_dimensions_event
self._draw(no_color_updates=True) # faster drawing without color changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\Lib\site-packages\customtkinter\windows\widgets\ctk_frame.py", line 110, in _draw
requires_recoloring = self._draw_engine.draw_rounded_rect_with_border(self._apply_widget_scaling(self._current_width),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\Lib\site-packages\customtkinter\windows\widgets\core_rendering\draw_engine.py", line 128, in draw_rounded_rect_with_border
return self.__draw_rounded_rect_with_border_font_shapes(width, height, corner_radius, border_width, inner_corner_radius, ())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\Lib\site-packages\customtkinter\windows\widgets\core_rendering\draw_engine.py", line 285, in __draw_rounded_rect_with_border_font_shapes
self._canvas.coords("inner_oval_1_a", border_width + inner_corner_radius, border_width + inner_corner_radius, inner_corner_radius)
File "\Lib\site-packages\customtkinter\windows\widgets\core_rendering\ctk_canvas.py", line 87, in coords
super().coords(coords_id, *args[:2])
File "\Lib\tkinter\__init__.py", line 2836, in coords
self.tk.splitlist(
TypeError: splitlist() argument must be encoded string without null bytes, not str
Exception in Tkinter callback
Traceback (most recent call last):
File "\Lib\tkinter\__init__.py", line 1962, in __call__
return self.func(*args)
^^^^^^^^^^^^^^^^
File "\Lib\site-packages\customtkinter\windows\widgets\core_widget_classes\ctk_base_class.py", line 188, in _update_dimensions_event
self._draw(no_color_updates=True) # faster drawing without color changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\Lib\site-packages\customtkinter\windows\widgets\ctk_label.py", line 161, in _draw
requires_recoloring = self._draw_engine.draw_rounded_rect_with_border(self._apply_widget_scaling(self._current_width),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\Lib\site-packages\customtkinter\windows\widgets\core_rendering\draw_engine.py", line 128, in draw_rounded_rect_with_border
return self.__draw_rounded_rect_with_border_font_shapes(width, height, corner_radius, border_width, inner_corner_radius, ())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\Lib\site-packages\customtkinter\windows\widgets\core_rendering\draw_engine.py", line 309, in __draw_rounded_rect_with_border_font_shapes
self._canvas.coords("inner_rectangle_1", (border_width + inner_corner_radius,
File "\Lib\site-packages\customtkinter\windows\widgets\core_rendering\ctk_canvas.py", line 99, in coords
super().coords(tag_or_id, *args)
File "\Lib\tkinter\__init__.py", line 2836, in coords
self.tk.splitlist(
TypeError: splitlist() argument must be encoded string without null bytes, not str