IPython crash when use showtraceback with exception_only=True
See original GitHub issueUsed IPython version: 7.20.0-py38hd4e2768_1
The following exception was raised:
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1103, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "C:\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 248, in wrapped
return f(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 281, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "C:\Anaconda3\lib\inspect.py", line 1503, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
AttributeError: 'tuple' object has no attribute 'tb_frame'
And when this exception is caught in IPython.core.ultratb.VerboseTB.get_records, the return value is None:
def get_records(self, etb, number_of_lines_of_context, tb_offset):
try:
# Try the default getinnerframes and Alex's: Alex's fixes some
# problems, but it generates empty tracebacks for console errors
# (5 blanks lines) where none should be returned.
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
except UnicodeDecodeError:
# This can occur if a file's encoding magic comment is wrong.
# I can't see a way to recover without duplicating a bunch of code
# from the stdlib traceback module. --TK
error('\nUnicodeDecodeError while processing traceback.\n')
return None
**except:
# FIXME: I've been getting many crash reports from python 2.3
# users, traceable to inspect.py. If I can find a small test-case
# to reproduce this, I should either write a better workaround or
# file a bug report against inspect (if that's the real problem).
# So far, I haven't been able to find an isolated example to
# reproduce the problem.
inspect_error()
traceback.print_exc(file=self.ostream)
info('\nUnfortunately, your original traceback can not be constructed.\n')
return None**
But the next operation with return value that it is called len() in IPython.core.ultratb.find_recursion, and this causes an exception and IPython crash.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (9 by maintainers)
Top Results From Across the Web
Crash while rendering traceback · Issue #12467 · ipython ...
Running code that uses raise from inside Jupyter interfaces or IPython will trigger the bug. The behaviour is the following: JupyterLab or ...
Read more >Ipython: Autocompletion crashes session ('sys' is not defined)
When I try to use iPython's auto-completion, the session crashes with the following error: Traceback (most recent call last): File ...
Read more >Issues closed in the 0.12 development cycle — IPython 8.6.0 ...
643: enable gui eventloop integration in ipkernel. 965: ipython is crashed without launch.(python3.2). 958: Can't use os X clipboard on with qtconsole.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi. I think the issue is still existing. On my side I manage to reproduce the issue with click library. The minimal code snippet is below.
Then executed in IPython with the following argugments:
I encounter the issue with IPython version 7.22.0 , on Databricks platform using a “Python” job (actions with them are also ongoing).
Should we create a different issue for this one in case this is specific to click? Let me know. Thanks.
Same issue here with IPython version 7.27.0 on Databricks, are there any news on that?