friendly-traceback / friendly

Friendly-traceback's version used in most situations
https://friendly-traceback.github.io/docs/index.html
MIT License
42 stars 5 forks source link

Collapsible error messages #3

Closed psychemedia closed 3 years ago

psychemedia commented 3 years ago

When working in Jupyter notebooks, long error messages can often be intrusive and add a lot of visual clutter to notebooks.

A couple of extensions ([classic notebook nbextensions/skip-traceback(https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions/skip-traceback) and jupyterlab-skip-traceback) both collapse the traceback under the error header, but I note that the friendly extension breaks at least the classic notebook extension.

For the Jupyter layout, it would be useful to return errors using the skip-traceback style folded display (perhaps with a setting to override a by-default collapsed view with an expanded view).

aroberge commented 3 years ago

Thanks for this suggestion. I do not use Jupyter notebooks - except for testing with friendly - and was not aware of these extensions. I will look into implementing this after I finish preparing a talk for PyConAu.

aroberge commented 3 years ago

I take this as different than what I propose in #5. Here, I consider finding a way to make the output of friendly compatible with the existing extensions. From what I have read, this means "packaging" the information compiled by friendly in a different way, rather than simply printing it.

I think that an iPywidget like suggested in #5 would be more user-friendly, but want to give the option for people to keep the existing ones (especially if they do not control what is installed by default and want to use friendly).

psychemedia commented 3 years ago

I think there are three possible approaches.

Either:

aroberge commented 3 years ago

Closing this issue as I have decided that implementing my own version should suffice.