-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
IDLE: OK sometimes fails to close configdialog #82110
Comments
If one opens configdialog when there is no Shell and then hits OK, the dialog fails to close. The following Squeezer-related traceback appears in associated console when there is one. Exception in Tkinter callback
Traceback (most recent call last):
File "F:\dev\3x\lib\tkinter\__init__.py", line 1885, in __call__
return self.func(*args)
File "F:\dev\3x\lib\idlelib\configdialog.py", line 172, in ok
self.apply()
File "F:\dev\3x\lib\idlelib\configdialog.py", line 186, in apply
self.activate_config_changes()
File "F:\dev\3x\lib\idlelib\configdialog.py", line 240, in activate_config_changes
klass.reload()
File "F:\dev\3x\lib\idlelib\squeezer.py", line 222, in reload
instance.load_font()
File "F:\dev\3x\lib\idlelib\squeezer.py", line 318, in load_font
Font(text, font=text.cget('font')).measure('0')
File "F:\dev\3x\lib\idlelib\delegator.py", line 10, in __getattr__
attr = getattr(self.delegate, name) # May raise AttributeError
AttributeError: 'NoneType' object has no attribute 'cget' Either the squeezer instance should be destroyed and removed along with Shell or, if keeping it is intentional, it should be removed from the update list and reinstated or if not doing that is intentional, it must either check 'if text is not None' before the access or catch the attribute error after. Tal, which? |
See PR #59657 with a fix. |
Fixed. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: