Dominic Mayers <dominic_may...@yahoo.com> added the comment:

If it's normal, then the error message should perhaps be more informative and 
user friendly than just a traceback: 

    Traceback (most recent call last):
      File "./dialog.py", line 6, in <module>
        integer_value = simpledialog.askinteger('Dialog Title', 'What is your 
age?', minvalue=0, maxvalue=100)
      File "/usr/lib/python3.7/tkinter/simpledialog.py", line 341, in askinteger
        d = _QueryInteger(title, prompt, **kw)
      File "/usr/lib/python3.7/tkinter/simpledialog.py", line 271, in __init__
        Dialog.__init__(self, parent, title)
      File "/usr/lib/python3.7/tkinter/simpledialog.py", line 137, in __init__
        if parent.winfo_viewable():
    AttributeError: 'NoneType' object has no attribute 'winfo_viewable'

If it is not too intrusive, it would be even more user friendly if the code 
found some parent window.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39171>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to