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

BUG list update : scaling_tracker.py #2444

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hakan9999
Copy link

✒🇬🇧 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

✒🇬🇧 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
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant