iris icon indicating copy to clipboard operation
iris copied to clipboard

Catch failed html_repr for cube

Open DPeterK opened this issue 6 years ago • 1 comments

In jupyter, if an enhanced repr (such as _repr_html_) fails, the exception is raised but the execution continues, also returning the standard repr. This is useful for noting that there's a problem with the _repr_html_, but very bad for UX (as reflected in #3351).

As such, here we catch exceptions raised by constructing the html repr and explicitly return None so that the default repr is returned instead.

DPeterK avatar Aug 23 '19 10:08 DPeterK

@DPeterK Fancy doing a rebase?

bjlittle avatar Oct 02 '19 11:10 bjlittle

This seems to have gone stale. We still have ambitions for better HTML, particularly given @pp-mo's work turning the Cube summary into actual objects, which would make for much better HTML creation. But that would need a different PR, so I'm going to close this one. @DPeterK feel free to re-open if you disagree.

trexfeathers avatar Sep 21 '22 09:09 trexfeathers