Skip to content
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

Report errors when notebook execution fails #34

Closed
SylvainCorlay opened this issue Dec 3, 2018 · 3 comments
Closed

Report errors when notebook execution fails #34

SylvainCorlay opened this issue Dec 3, 2018 · 3 comments

Comments

@SylvainCorlay
Copy link
Member

Currently, this merely results in a 503 error screen.

More details could be made available to the user (optionally since, this could give information about the code being executed).

@jtpio
Copy link
Member

jtpio commented Jan 24, 2019

Having a way to inform the user when the kernel is restarted would also be useful (out of memory for example which can happen after the notebook has been executed).

@yuvipanda
Copy link

If you have a notebook with code:

raise Exception("hi");

When serving it, you get a 503 and the following in the logs:

[Voila] Executing notebook with kernel: 
ERROR:tornado.application:Uncaught exception GET / (::1)
HTTPServerRequest(protocol='http', host='localhost:8866', method='GET', uri='/', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/home/yuvipanda/.local/share/virtualenvs/nbresuse-IT4b9ZTA/lib/python3.6/site-packages/tornado/web.py", line 1699, in _execute
    result = await result
  File "/home/yuvipanda/.local/share/virtualenvs/nbresuse-IT4b9ZTA/lib/python3.6/site-packages/tornado/gen.py", line 742, in run
    yielded = self.gen.send(value)
  File "/home/yuvipanda/.local/share/virtualenvs/nbresuse-IT4b9ZTA/lib/python3.6/site-packages/voila/handler.py", line 66, in get
    result = executenb(notebook, km=km)
  File "/home/yuvipanda/.local/share/virtualenvs/nbresuse-IT4b9ZTA/lib/python3.6/site-packages/nbconvert/preprocessors/execute.py", line 534, in executenb
    return ep.preprocess(nb, resources, km=km)[0]
  File "/home/yuvipanda/.local/share/virtualenvs/nbresuse-IT4b9ZTA/lib/python3.6/site-packages/nbconvert/preprocessors/execute.py", line 354, in preprocess
    nb, resources = super(ExecutePreprocessor, self).preprocess(nb, resources)
  File "/home/yuvipanda/.local/share/virtualenvs/nbresuse-IT4b9ZTA/lib/python3.6/site-packages/nbconvert/preprocessors/base.py", line 69, in preprocess
    nb.cells[index], resources = self.preprocess_cell(cell, resources, index)
  File "/home/yuvipanda/.local/share/virtualenvs/nbresuse-IT4b9ZTA/lib/python3.6/site-packages/nbconvert/preprocessors/execute.py", line 378, in preprocess_cell
    raise CellExecutionError.from_cell_and_msg(cell, out)
nbconvert.preprocessors.execute.CellExecutionError: An error occurred while executing the following cell:
------------------
raise Exception("Hi")
------------------

---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-1-e0bfd6b3c1b1> in <module>
----> 1 raise Exception("Hi")

Exception: Hi
Exception: Hi

Would be nice to show this to the user, however we have to consider the security implications of showing unfiltered exception info to users. It might leak data that shouldn't be leaked.

@maartenbreddels
Copy link
Member

Solved in #186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants