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
Executing cannot find node inside Jupyter lab/notebooks #23
Comments
IPython needs special treatment, and executing uses the The switch to files is annoying, I'll need to find a new way to reliably detect an IPython code object. This also affects snoop: https://github.com/alexmojaki/snoop/blob/49ce617297fcdd5efa46de70626a64997eee724d/snoop/tracer.py#L45 Thanks for letting me know about this. |
So far, it seems that all files have names that contain Future versions may include the code cell as information according to ipython/ipython#13043 |
Released 0.8.0, please upgrade and confirm that this is fixed for you and that Python 3.10 also works. |
Everything that I tested is working. I only have automated tests for friendly-traceback (and not the friendly UI layer). Requiring friendly-traceback to use executing 0.8.0 did not change anything (as expected since it does not involve ipython): all tests pass, with Python 3.6 to 3.10 inclusively. I normally only test ipython/jupyter with Python 3.9. Doing a single test similar to the one above
With Python 3.10.0b4
|
Excellent! Thanks for your help. |
Using friendly, I found that excuting could not locate the correct location of a node causing a problem inside Jupyter notebooks (or Jupyter lab) but could do so with IPython. First, here's a screen capture showing the correct result using IPython, with some additional outputs from print statements inserted for this specific report.
Next, the same code run within a Jupyter notebook
Perhaps this is is caused by the new way that Jupyter runs code, using temporary files instead of using exec() on code.
With the "old" friendly-traceback (before it made use of stack_data), when Jupyter was not using temporary files, I see from screen captures on https://aroberge.github.io/friendly-traceback-docs/docs/html/jupyter.html that the location was correctly picked up.
The text was updated successfully, but these errors were encountered: