TomSchimansky / CustomTkinter

A modern and customizable python UI-library based on Tkinter
MIT License
10.77k stars 1.03k forks source link

BUG list update : scaling_tracker.py #2444

Open Hakan9999 opened 1 month ago

Hakan9999 commented 1 month ago

✒🇬🇧 Exeplication : This is because the size of the cls.window_widgets_dict dictionary changes during iteration. This means that an element is added to or removed from the dictionary while the for loop is running, resulting in the RuntimeError.

✒🇫🇷 Explication : C'est dû au fait que la taille du dictionnaire cls.window_widgets_dict change pendant l'itération. Cela signifie qu'un élément est ajouté ou supprimé du dictionnaire pendant que la boucle for est en cours, ce qui entraîne l'erreur RuntimeError.

🖥 Console :

Exception in Tkinter callback
Traceback (most recent call last):
File "***\Programs\Python\Python311\Lib\tkinter\__init__.py", line 1948, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
File "***\Programs\Python\Python311\Lib\tkinter\__init__.py", line 861, in callit
    func(*args)
File "***\Programs\Python\Python311\Lib\site-packages\customtkinter\windows\widgets\scaling\scaling_tracker.py", line 177, in check_dpi_scaling
    for window in cls.window_widgets_dict:
RuntimeError: dictionary changed size during iteration