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
Output widgets could expose code from exceptions #203
Comments
I think voila should not show stderr, what do you think @SylvainCorlay? |
Could it be an option? That would make sense to display errors sometimes. Say you have an upload button but your user tries to upload a malformed file, the user should get feedback through error messages. Actually, I think it should display errors by default. You don't want to hide errors from users, nor from dashboard developers. If there are errors in the Notebook, you should be able to know it, and you should fix it. |
But stack traces leak code, so I think it should be behind some flag, or maybe have a dev mode, doesn't PHP do something like that as well? |
Oh I see |
I did some more digging, and this seems a little tricky. The reason Also note that after #186, you now see exception tracebacks that are not wrapped up in an Output widget. Those you could take care of with a custom exception handler; e.g. show the exception message but not the traceback. I should also mention that this isn't a major concern for my team - we have use cases where we don't want the dashboard user to modify the code, but we don't care if they see it. But I know it may be a concern for others. |
This might just be a case of "don't do that" but I thought it was worth mentioning. If code runs as part of a callback and is using an Output widget, then exception tracebacks will be shown in the Output widget. Minimal example below.
I tried using
get_ipython().set_custom_exc()
to change the exception handler, but curiously that took effect on "regular" code but not code that was tied to an Output widget.Related: #34, #186
The text was updated successfully, but these errors were encountered: