Closed karplus closed 7 years ago
Original comment by kevin_karplus (Bitbucket: kevin_karplus, ).
The bug only seems to happen in Python 3.5.2 (from Anaconda), not 2.7 nor 3.4. It seems to be a new bug in Tkinter's handling of DoubleVar fields. I've not checked in Python 3.6.0 (not installed yet).
Original comment by kevin_karplus (Bitbucket: kevin_karplus, ).
Fixed by adding tk._tkinter.TclError to except (along with existing ValueError)
Original report by kevin_karplus (Bitbucket: kevin_karplus, ).
Editing the Hz field or period field so that it is temporarily blank (even with retyping a selection) results in a crash due to an empty field not being understood by the conversion to float.
I think the problem can be resolved by protecting the float() call with a check to make sure the field isn't empty.