-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Fix crash and error dialog when triggering OverflowError (too large int) when editing arrays and dataframes #6118
Conversation
Hello @CAM-Gerlach! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on January 04, 2018 at 16:21 Hours UTC |
All builds on Travis, but not AppVeyor or CircleCI, are failing all four tests, apparently due to self.test_array[0] = val not raising an error (OverflowError) when it should, despite confirming that FYI, AppVeyor is only failing (one test) this cycle due to using |
There is also no OverflowError being raised on my Linux box when assigning
|
numpy/numpy#6289 seems to confirm this |
a7ac0d9
to
554e2fc
Compare
@jitseniesen Sorry to bother you again @jitseniesen , but any idea on this one? Its only |
7de5e29
to
49f071b
Compare
|
||
@flaky(max_runs=3) | ||
@pytest.mark.skipif(os.environ.get('CI', None) is not None and | ||
system() == "Linux", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use sys.platform.startswith('linux')
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that's what I used on the other one previously, but couldn't remember the exact syntax. Just curious, what's the advantage over platform.system()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just our custom throughout our entire codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks.
@CAM-Gerlach, I left a minor comment, then I'd say this is ready. |
Updated as requested, plus more minor cleanup. CIs are still running, but I'm going to try to get a little sleep before work so wanted to let you know before. Thanks! |
@ccordoba12 Checks passed, so should be ready to go. |
Fixes #6114 .
Spyder array and dataframe editor now fail gracefully when a value too large for the given (int) datatype is entered in a cell, showing a warning message rather than crashing or displaying an error dialog, respectively (the former due to a Python3-incompatible
e.message
syntax of retrieving the error string in that case). Also, a bit of minor associated cleanup.TODO: Add a simple test for each, ETA Tomorrow...err, later today (Wednesday). Assuming that happens in time, it could be included in 3.2.6, though no pressure on my end.
Also, one really weird bug I wasn't yet able to track down: Before the Array Editor change, Spyder would crash completely ("Python has stopped working...") due to the exception handling bug, except when SPYDER_DEBUG=3. In that case, it would just print the error traceback to the shell it was launched in and continue on. However, conversely, once this fix was implemented it now works fine in all scenarios, except when SPYDER_DEBUG=3 and one hits enter/return to confirm the whole Array editor dialog, rather than just clicking off of the current cell to save just it. In the former case, the warning dialog is triggered as it should, but after hitting okay, the Variable Explorer window c;loses and then a "Python has stopped working..." crash is triggered. I was able to get the following traceback printed to console:
When I tried catching and passing that error, it would still crash, presumably somewhere else maybe in C++ that I couldn't see. Again, this only happened in SPYDER_DEBUG=3, when hitting enter right from the edit box, and with an OverflowError of course. If you have any insight, please let me know; otherwise just ignore this and I'll look into it more tomorrow...er, today.