notebook icon indicating copy to clipboard operation
notebook copied to clipboard

Error output suppressed using IRkernel

Open fonnesbeck opened this issue 9 years ago • 4 comments

Using Jupyter 5.0.0.dev (built from master a few days ago) with an R kernel (IRkernel), important error output is suppressed when code is run in the notebook. The error messages are reported normally when run in a standard R shell.

The notebook I am running is here.

The first screen shot shows the model code run in an R session (this was exported directly from the notebook's export facility), with the key error message shown in red:

screenshot 2016-05-16 20 32 59

However, when run as a notebook, the error line is missing

screenshot 2016-05-16 20 33 47

Session information: Python 3.5.1 |Continuum Analytics, Inc.| (default, Dec 7 2015, 11:24:55) [GCC 4.2.1 (Apple Inc. build 5577)] R version 3.2.5 (2016-04-14)

fonnesbeck avatar May 17 '16 01:05 fonnesbeck

This also might be an issue with the R kernel itself. Could you open an issue on this repo as well: https://github.com/IRkernel/IRkernel

On Mon, May 16, 2016 at 6:34 PM, Chris Fonnesbeck [email protected] wrote:

Using Jupyter 5.0.0.dev (built from master a few days ago) with an R kernel (IRkernel), important error output is suppressed when code is run in the notebook. The error messages are reported normally when run in a standard R shell.

The notebook I am running is here https://gist.github.com/a025f78ad1bdff0835232523273a56b3.

The first screen shot shows the model code run in an R session (this was exported directly from the notebook's export facility), with the key error message shown in red:

[image: screenshot 2016-05-16 20 32 59] https://cloud.githubusercontent.com/assets/81476/15308675/690618ca-1ba5-11e6-8d6c-a64b23ec737d.png

However, when run as a notebook, the error line is missing

[image: screenshot 2016-05-16 20 33 47] https://cloud.githubusercontent.com/assets/81476/15308689/8554f7e4-1ba5-11e6-9577-bf36b47246c6.png

Session information: Python 3.5.1 |Continuum Analytics, Inc.| (default, Dec 7 2015, 11:24:55) [GCC 4.2.1 (Apple Inc. build 5577)] R version 3.2.5 (2016-04-14)

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/jupyter/notebook/issues/1461

Brian E. Granger Associate Professor of Physics and Data Science Cal Poly State University, San Luis Obispo @ellisonbg on Twitter and GitHub [email protected] and [email protected]

ellisonbg avatar May 17 '16 04:05 ellisonbg

I would guess that the error message is being written to stderr at a lower level than our capturing works - this also comes up in some cases in Python. Once the kernel nanny machinery (jupyter/enhancement-proposals#14) lands, it should fix cases like this (assuming IRkernel opts in to the output capturing part of that spec).

takluyver avatar May 17 '16 09:05 takluyver

@ellisonbg Will do.

fonnesbeck avatar May 17 '16 12:05 fonnesbeck

Having error seen in notebooks would be important. This (very old) issue is still open - is there a workaround maybe?

rromancloudera avatar Feb 25 '25 14:02 rromancloudera