question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ipython3 crash: nested exceptions?

See original GitHub issue

I just recently started getting seemingly random crashes - complete crash of the kernel, requring restart – that appear to be related to exceptions occurring within the exception handler. The trigger appears completely random, but always starts with some sort of reasonable error at the console, followed by a long stack trace. Something like this, where the “Original exception” is my mistake:

Original exception was:
Traceback (most recent call last):
  File "/home/mazer/.local/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3361, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-131-ddf36e5e5914>", line 1, in <cell line: 1>
  File "/home/mazer/src/taut/notebooks/jamie/graph-audio/debugger.py", line 238, in run_pipeline
    sup.title(f'sentence # {sampleno}')
NameError: name 'sup' is not defined
....

During handling of the above exception caused by my typo, another exception occurrs inside ipython:

Traceback (most recent call last):
  File "/home/mazer/.local/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 1979, in showtraceback
    stb = value._render_traceback_()
AttributeError: 'NameError' object has no attribute '_render_traceback_'

followed by along, inconsistent stack trace that always ends with:

  File "/home/mazer/.local/lib/python3.8/site-packages/stack_data/core.py", line 628, in executing_piece
    return only(
  File "/home/mazer/.local/lib/python3.8/site-packages/executing/executing.py", line 164, in only
    raise NotOneValueFound('Expected one value, found 0')
executing.executing.NotOneValueFound: Expected one value, found 0

Just started getting this since I did a fresh update/install of the virtualenv I’m using.

Anybody seen this or have any ideas about what might be causing this?

Thanks, Jamie

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mazer-aicommented, Mar 15, 2022

No - looks like I’m running 0.2.0 via pip - you mean install from github? Think this is a stack_data bug or ipython passing something bad into stack data? Not really sure how to debug this since the interpreter completely dies each time leaving now way to poke around … and its hard to trigger – haven’t been able to do it reliably…

On Tue, Mar 15, 2022 at 1:19 AM Matthias Bussonnier < @.***> wrote:

Have yo tried updating stack_data and executing ?

— Reply to this email directly, view it on GitHub https://github.com/ipython/ipython/issues/13586#issuecomment-1067650013, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATUE7KNACRXABCUYHRVR2FTVAA2ZZANCNFSM5QQ2KBVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

0reactions
alexmojakicommented, Aug 13, 2022

This looks like a duplicate of https://github.com/ipython/ipython/issues/13598. pip install -U executing, that should fix it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

nested exceptions crash (Cannot recover from stack overflow ...
The following code works[1] on trunk and 2.5.1, but crashes with "Fatal Python error: Cannot recover from stack overflow," on py3k as of ......
Read more >
Python nested error handling - Stack Overflow
1 Answer 1 · So there is no solution to ignore exceptions ? – Sion C Oct 29, 2017 at 12:43 · If...
Read more >
Learning (not) to Handle Exceptions - Python for the Lab
In this article, you are going to learn how to handle exceptions, i.e. how to avoid program crashes when you can anticipate that...
Read more >
Python Exceptions: An Introduction - Real Python
In this beginner tutorial you'll learn what exceptions are good for in Python. ... This exception error will crash the program if it...
Read more >
Honeybadger now supports causes / nested exceptions
Ruby 2.1 and later support nested exceptions via the Exception#cause method. Now you can view these for any error reported to Honeybadger.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found