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

Make it obvious that cell execution has failed (now output might be collapsed, hiding problem away) #88

Closed
yarikoptic opened this Issue Dec 6, 2012 · 5 comments

Comments

Projects
None yet
2 participants
@yarikoptic
Contributor

yarikoptic commented Dec 6, 2012

Steps to reproduce the problem

I am a newcomer to EIN and to try it I opened some elderly notebook
where first cell lead to ImportError, but instead of the traceback I
got only
.
which gave me an impression that everything is alright, but subsequent
cell failed to run for a completely confusing reason if I would assume
that previous cell ran Ok.

When I found out that I could expand the output (C-c C-e) -- only then
I saw that there was an ImportError raised.

So, it would be cool if 'Failed' cells could be easily
detected. Possible resolutions:

Expected output

  • Instead of '.', in collapsed mode, output str representation of the
    exception, e.g.

    ImportError: No module named pandas

  • may be color-code that cell prompt, i.e. make 'In [X]' red?

Your IPython configuration

  1. What is your IPython version? (run ipython --version):

0.13.1

  1. How do you start IPython? (e.g., ipython notebook --port 9999):

    ipython notebook --pylab=inline

System info:

("EIN system info" :emacs-version "GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)\n of 2012-04-07 on trouble, modified by Debian" :emacs-bzr-version nil :window-system x :emacs-variant nil :os
 (:uname "Linux novo 3.2.0-3-amd64 #1 SMP Thu Jun 28 09:07:26 UTC 2012 x86_64 GNU/Linux\n" :lsb-release "No LSB modules are available.\nDistributor ID: Debian\nDescription:    Debian GNU/Linux testing (wheezy)\nRelease: testing\nCodename:  wheezy\n")
 :image-types
 (svg png gif tiff jpeg xpm postscript xbm pbm)
 :image-types-available
 (svg png gif tiff jpeg xpm postscript xbm pbm)
 :ein
 (:version "0.2.0alpha0.a1466a1" :source-dir "/home/yoh/proj/misc/emacs-ipython-notebook/lisp/")
 :lib
 ((:name "websocket" :path "~/proj/misc/emacs-websocket/websocket.el" :featurep t :version-var websocket-version :version "1.0")
  (:name "auto-complete" :path nil :featurep nil :version-var nil :version nil)
  (:name "mumamo" :path nil :featurep nil :version-var nil :version nil)
  (:name "auto-complete" :path nil :featurep nil :version-var nil :version nil)
  (:name "popup" :path nil :featurep nil :version-var nil :version nil)
  (:name "fuzzy" :path nil :featurep nil :version-var nil :version nil)
  (:name "pos-tip" :path nil :featurep nil :version-var nil :version nil)
  (:name "python" :path "/usr/share/emacs/23.4/lisp/progmodes/python.elc" :featurep t :version-var nil :version nil)
  (:name "python-mode" :path "~/deb/gits/python-mode.bzr2/python-mode.el" :featurep t :version-var nil :version nil)
  (:name "markdown-mode" :path "/usr/share/emacs23/site-lisp/emacs-goodies-el/markdown-mode.elc" :featurep nil :version-var nil :version nil)
  (:name "smartrep" :path nil :featurep nil :version-var nil :version nil)
  (:name "anything" :path nil :featurep nil :version-var nil :version nil)
  (:name "helm" :path nil :featurep nil :version-var nil :version nil)))
@tkf

This comment has been minimized.

Show comment
Hide comment
@tkf

tkf Dec 6, 2012

Owner

Just to be sure. It happens only when you accidentally type C-c C-e before executing the code, right? If you open a new notebook and execute the same code, you should see the error. If not, I guess it's a bug in EIN.

But I think making the error clearer for collapsed cell is a good UI. Until I introduce the change, don't collapse cell when executing code.

Owner

tkf commented Dec 6, 2012

Just to be sure. It happens only when you accidentally type C-c C-e before executing the code, right? If you open a new notebook and execute the same code, you should see the error. If not, I guess it's a bug in EIN.

But I think making the error clearer for collapsed cell is a good UI. Until I introduce the change, don't collapse cell when executing code.

@yarikoptic

This comment has been minimized.

Show comment
Hide comment
@yarikoptic

yarikoptic Dec 6, 2012

Contributor

sorry for being not clear -- output (with error) was collapsed right away. Exact course of action was:

  • open notebook (previously computed and saved with output, no errors, that cell had no output)
  • press C-c C-c in the first cell -- obtain "." in the output
  • Only after pressing C-c C-e -- see that there was an error
Contributor

yarikoptic commented Dec 6, 2012

sorry for being not clear -- output (with error) was collapsed right away. Exact course of action was:

  • open notebook (previously computed and saved with output, no errors, that cell had no output)
  • press C-c C-c in the first cell -- obtain "." in the output
  • Only after pressing C-c C-e -- see that there was an error
@tkf

This comment has been minimized.

Show comment
Hide comment
@tkf

tkf Dec 6, 2012

Owner

What happens if you execute the same code in a new notebook?

IPython notebook has collapsed attribute for each cell and you can save this state (output is hidden or shown) to the notebook file. So, my guess is that the cell in the notebook you opened is collapsed when it is saved before. If you did not overwrite the notebook, you can check it in the same in the official browser client.

Owner

tkf commented Dec 6, 2012

What happens if you execute the same code in a new notebook?

IPython notebook has collapsed attribute for each cell and you can save this state (output is hidden or shown) to the notebook file. So, my guess is that the cell in the notebook you opened is collapsed when it is saved before. If you did not overwrite the notebook, you can check it in the same in the official browser client.

@tkf

This comment has been minimized.

Show comment
Hide comment
@tkf

tkf Dec 6, 2012

Owner

Ah, no. It looks like the browser client reset the collapsed attribute when the cell is executed. I will check the official client code and make the behavior same in EIN.

Owner

tkf commented Dec 6, 2012

Ah, no. It looks like the browser client reset the collapsed attribute when the cell is executed. I will check the official client code and make the behavior same in EIN.

@yarikoptic

This comment has been minimized.

Show comment
Hide comment
@yarikoptic

yarikoptic Dec 6, 2012

Contributor

cool -- thanks

and yes -- I did check in the browser -- that is how I first discovered
that there actually was an exception thrown ;)

On Thu, 06 Dec 2012, Takafumi Arakaki wrote:

Ah, no. It looks like the browser client reset the collapsed attribute
when the cell is executed. I will check the official client code and make
the behavior same in EIN.

Yaroslav O. Halchenko
Postdoctoral Fellow, Department of Psychological and Brain Sciences
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik

Contributor

yarikoptic commented Dec 6, 2012

cool -- thanks

and yes -- I did check in the browser -- that is how I first discovered
that there actually was an exception thrown ;)

On Thu, 06 Dec 2012, Takafumi Arakaki wrote:

Ah, no. It looks like the browser client reset the collapsed attribute
when the cell is executed. I will check the official client code and make
the behavior same in EIN.

Yaroslav O. Halchenko
Postdoctoral Fellow, Department of Psychological and Brain Sciences
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik

@tkf tkf closed this in 866002d Dec 6, 2012

tkf added a commit that referenced this issue Dec 6, 2012

Merge branch 'expand-output-on-execution'
Expand cell when kernel send some output.

fixes #88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment