-
Notifications
You must be signed in to change notification settings - Fork 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
Deprecation/removal of @json_errors prevents return of NoSuchKernel exception #2942
Comments
It looks like the notebook code in if isinstance(e, HTTPError):
reply['message'] = e.log_message or message
else:
reply['message'] = 'Unhandled error'
reply['traceback'] = ''.join(traceback.format_exception(*exc_info)) Whereas the equivalent code in kernel_gateway (in JSONErrorsMixin) looks like this: try:
message = exception.log_message % exception.args
except Exception:
pass I suspect that's the source of the difference. |
Thanks @takluyver (and congratulations on your recent recognition!) So if I understand your response, it seems to imply that the As a result, are you suggesting the kernel gateway code get updated? Thanks. |
I haven't really followed kernel_gateway closely, and I don't know exactly how the deprecation of |
Thanks @takluyver. I'm pretty sure I see what's going on here - adding @minrk and @parente for comment. Once the Since I stumbled upon this when looking at another test failure where the reason field for a 403 exception was not the expected If I make that change, then all JKG tests pass when The other approach is to apply the content of |
Sorry for all the ramble (that's what I do :-) ). Now that this has been narrowed down and I'm convinced the notebook portion is just a matter of establishing the |
The kernel_gateway (and, by extension the new enterprise_gateway incubator) tests now encounter a test failure which is specifically looking for the NoSuchKernel exception in the returned json body.
The test issues a start kernel request sans the kernel name, after setting the default kernel name to a bogus value (
fake-kernel
) and expects an exception - knowing thatfake-kernel
doesn't exist, which then confirms that the default kernel is being used. However, after 5.2.0 has been available, all build tests get this single failure. I then used some targeted searches and pulled various commits to see where the breakage occurs and found that the commits in PR #2853 lead to the issue.Unfortunately, I'm not certain how callers are supposed to address this issue since I'm not familiar enough with tornado handlers.
Here's the command to reproduce the issue from JKG:
nosetests --nocapture --cover-package=kernel_gateway kernel_gateway.tests.test_jupyter_websocket.TestCustomDefaultKernel
and output...
I added a print statement into the corresponding enterprise_gateway test to see the actual response body.
response.body: b'{"reason": "Internal Server Error", "message": ""}'
when a fairly rich stack trace has been previously included.The text was updated successfully, but these errors were encountered: