Rich representation of exceptions/tracebacks

24 views
Skip to first unread message

Brian Granger

unread,
Nov 26, 2017, 1:04:58 PM11/26/17
to Project Jupyter
Hi all,

Has anyone done work on using rich MIME based representations of
exceptions and tracebacks in IPython+Jupyter?

This nice blog post got me thinking about providing more helpful
representations of errors to users:

https://blog.keras.io/user-experience-design-for-apis.html

Cheers,

Brian

--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgra...@calpoly.edu and elli...@gmail.com

Matthias Bussonnier

unread,
Nov 26, 2017, 5:23:16 PM11/26/17
to jup...@googlegroups.com
Yes,

I poked at it some time ago (sorry no branches), and plan to do refactoring of IPython's error machinery to improve that. One issue is that the Traceback fromatter does tokenizing and coloring at the same time (with raw escape sequences) instead of yielding data structures that can be formatted later. This was one of my reason to push Python 3 : to use generators, yield and yield-from in this part of the codebase.
It is still _way_ too messy now, but better than it was a year ago.

That's technically, for the overview, I also discussed a bit with Kyle at spring dev meeting (and looked at tonic dev). I think that having some "get together" with kernels author from multiple languages would be useful. In particular I'd like to integrate the discussion about a debugger protocol into this as well and/or link from error messages to code cells, which need a bit more coordination than "just" mimebundles.

I also tweeted [that](https://twitter.com/Mbussonn/status/933418933994098688) in response to same blog post, so you are 4 days late :-)
--
Matthias


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAH4pYpSCR6o-JFk--t0Sn3SjY%2B%2BZ_%2BFC0WAXSRCqt_Qy%3DEddyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Brian Granger

unread,
Nov 27, 2017, 1:38:44 PM11/27/17
to Project Jupyter
> I poked at it some time ago (sorry no branches), and plan to do refactoring
> of IPython's error machinery to improve that. One issue is that the
> Traceback fromatter does tokenizing and coloring at the same time (with raw
> escape sequences) instead of yielding data structures that can be formatted
> later. This was one of my reason to push Python 3 : to use generators, yield
> and yield-from in this part of the codebase.
> It is still _way_ too messy now, but better than it was a year ago.

OK, that is helpful!

> That's technically, for the overview, I also discussed a bit with Kyle at
> spring dev meeting (and looked at tonic dev). I think that having some "get
> together" with kernels author from multiple languages would be useful. In
> particular I'd like to integrate the discussion about a debugger protocol
> into this as well and/or link from error messages to code cells, which need
> a bit more coordination than "just" mimebundles.

Yeah I could imagine something more structured that mimebundles might
be helpful in this context.

>
> I also tweeted
> [that](https://twitter.com/Mbussonn/status/933418933994098688) in response
> to same blog post, so you are 4 days late :-)

:-) Thanks for the update, glad I wasn't alone in thinking about these things.

Cheers, Brian

> --
> Matthias
>
>
> On Sun, Nov 26, 2017 at 7:04 PM, Brian Granger <elli...@gmail.com> wrote:
>>
>> Hi all,
>>
>> Has anyone done work on using rich MIME based representations of
>> exceptions and tracebacks in IPython+Jupyter?
>>
>> This nice blog post got me thinking about providing more helpful
>> representations of errors to users:
>>
>> https://blog.keras.io/user-experience-design-for-apis.html
>>
>> Cheers,
>>
>> Brian
>>
>> --
>> Brian E. Granger
>> Associate Professor of Physics and Data Science
>> Cal Poly State University, San Luis Obispo
>> @ellisonbg on Twitter and GitHub
>> bgra...@calpoly.edu and elli...@gmail.com
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jupyter+u...@googlegroups.com.
>> To post to this group, send email to jup...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jupyter/CAH4pYpSCR6o-JFk--t0Sn3SjY%2B%2BZ_%2BFC0WAXSRCqt_Qy%3DEddyg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CANJQusUvjhb%3DZ1HP93cssJ%3Dzk19%2BK0fqO%3DZnm8P4hVAjchrt6A%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



Brian Granger

unread,
Nov 27, 2017, 1:39:54 PM11/27/17
to Project Jupyter
One further question - do you think there is anything we can do in the
meantime in upstream libraries such as Altair so support rich reprs of
errors? Sure we could just publish a mimebundle, but then then we
can't raise, right?
Reply all
Reply to author
Forward
0 new messages