Skip to content

Show file location of errors in cells #179

Description

@SeanDS

If there is an uncaught exception in a cell, there appears to be no information as to the real file line location where the error occurred:

Extension error:
Cell raised uncaught exception:
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-14-703b9bbf0f60> in <module>
      9 )
     10 """)
---> 11 sol = model.run()
     12 print(sol['xaxis1']['P'])
     13 print(sol['xaxis2']['P'])

[stack trace from imported library code]

Exception: The property <l1.P=1 @ 0x7f5c045fe2c0> cannot be changed

All I see for the source of the cell that had the error is <ipython-input-14-703b9bbf0f60> in <module>. I can search my project for the code shown in the error, but this is not ideal. Can Jupyter-Sphinx figure out the real file and line number corresponding to the error location and report this when an error occurs?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions