Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
trace back -> IPython exit
Python 3.9.0a5+ (heads/master:799d7d61a9, Apr 6 2020, 17:38:49)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.0.0.dev -- An enhanced Interactive Python. Type '?' for help.
In [1]: 1 /0
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-1-a37332903225>", line 1, in <module>
1 /0
ZeroDivisionError: division by zero
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'ZeroDivisionError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 261, in executing
args = executing_cache[key]
KeyError: (<code object run_code at 0x7f40c2e8c450, file "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3293>, 139916124669008, 142)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3254, in run_ast_nodes
if (await self.run_code(code, result, async_=asy)):
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3348, in run_code
self.showtraceback(running_compiled_code=True)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2046, in showtraceback
stb = self.InteractiveTB.structured_traceback(etype,
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 977, in structured_traceback
return FormattedTB.structured_traceback(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 877, in structured_traceback
return VerboseTB.structured_traceback(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 734, in structured_traceback
formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 700, in format_exception_as_a_whole
records = self.get_records(etb, number_of_lines_of_context, tb_offset)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 728, in get_records
return list(stack_data.FrameInfo.stack_data(etb, options=options))[tb_offset:]
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 543, in stack_data
yield from collapse_repeated(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/utils.py", line 80, in collapse_repeated
yield from map(mapper, original_group)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 533, in mapper
return cls(f, options)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 498, in __init__
self.executing = Source.executing(frame_or_tb)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 263, in executing
source = cls.for_frame(frame)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 212, in for_frame
return cls.for_filename(frame.f_code.co_filename, frame.f_globals or {})
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 225, in for_filename
result = source_cache[filename] = cls(filename, lines)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 81, in __init__
self.asttokens()
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 336, in asttokens
return ASTTokens(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/asttokens.py", line 65, in __init__
self.mark_tokens(self._tree)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/asttokens.py", line 76, in mark_tokens
MarkTokens(self).visit_tree(root_node)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/mark_tokens.py", line 49, in visit_tree
util.visit_tree(node, self._visit_before_children, self._visit_after_children)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/util.py", line 186, in visit_tree
ret = postvisit(current, par_value, value)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/mark_tokens.py", line 92, in _visit_after_children
nfirst, nlast = self._methods.get(self, node.__class__)(node, first, last)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/mark_tokens.py", line 330, in visit_keyword
util.expect_token(name, token.NAME, node.arg)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/util.py", line 56, in expect_token
raise ValueError("Expected token %s, got %s on line %s col %s" % (
ValueError: Expected token NAME:'co_flags', got NAME:'new_code' on line 144 col 9
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'ValueError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 261, in executing
args = executing_cache[key]
KeyError: (<code object run_ast_nodes at 0x7f40c2e8c2f0, file "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3142>, 139916124668656, 690)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2886, in _run_cell
return runner(coro)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/async_helpers.py", line 68, in _pseudo_sync_runner
coro.send(None)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3062, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3273, in run_ast_nodes
self.showtraceback()
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2046, in showtraceback
stb = self.InteractiveTB.structured_traceback(etype,
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 977, in structured_traceback
return FormattedTB.structured_traceback(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 877, in structured_traceback
return VerboseTB.structured_traceback(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 734, in structured_traceback
formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 700, in format_exception_as_a_whole
records = self.get_records(etb, number_of_lines_of_context, tb_offset)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 728, in get_records
return list(stack_data.FrameInfo.stack_data(etb, options=options))[tb_offset:]
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 543, in stack_data
yield from collapse_repeated(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/utils.py", line 80, in collapse_repeated
yield from map(mapper, original_group)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 533, in mapper
return cls(f, options)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 498, in __init__
self.executing = Source.executing(frame_or_tb)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 263, in executing
source = cls.for_frame(frame)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 212, in for_frame
return cls.for_filename(frame.f_code.co_filename, frame.f_globals or {})
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 225, in for_filename
result = source_cache[filename] = cls(filename, lines)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 81, in __init__
self.asttokens()
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 336, in asttokens
return ASTTokens(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/asttokens.py", line 65, in __init__
self.mark_tokens(self._tree)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/asttokens.py", line 76, in mark_tokens
MarkTokens(self).visit_tree(root_node)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/mark_tokens.py", line 49, in visit_tree
util.visit_tree(node, self._visit_before_children, self._visit_after_children)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/util.py", line 186, in visit_tree
ret = postvisit(current, par_value, value)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/mark_tokens.py", line 92, in _visit_after_children
nfirst, nlast = self._methods.get(self, node.__class__)(node, first, last)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/mark_tokens.py", line 330, in visit_keyword
util.expect_token(name, token.NAME, node.arg)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/util.py", line 56, in expect_token
raise ValueError("Expected token %s, got %s on line %s col %s" % (
ValueError: Expected token NAME:'co_flags', got NAME:'new_code' on line 144 col 9
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'ValueError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 261, in executing
args = executing_cache[key]
KeyError: (<code object _run_cell at 0x7f40c2e85b30, file "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2865>, 139916124642096, 60)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/bleeding/bin/ipython", line 8, in <module>
sys.exit(start_ipython())
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/__init__.py", line 126, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/terminal/ipapp.py", line 356, in start
self.shell.mainloop()
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/terminal/interactiveshell.py", line 559, in mainloop
self.interact()
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/terminal/interactiveshell.py", line 550, in interact
self.run_cell(code, store_history=True)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2857, in run_cell
result = self._run_cell(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2891, in _run_cell
self.showtraceback(running_compiled_code=True)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2046, in showtraceback
stb = self.InteractiveTB.structured_traceback(etype,
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 977, in structured_traceback
return FormattedTB.structured_traceback(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 877, in structured_traceback
return VerboseTB.structured_traceback(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 734, in structured_traceback
formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 700, in format_exception_as_a_whole
records = self.get_records(etb, number_of_lines_of_context, tb_offset)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/ultratb.py", line 728, in get_records
return list(stack_data.FrameInfo.stack_data(etb, options=options))[tb_offset:]
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 543, in stack_data
yield from collapse_repeated(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/utils.py", line 80, in collapse_repeated
yield from map(mapper, original_group)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 533, in mapper
return cls(f, options)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 498, in __init__
self.executing = Source.executing(frame_or_tb)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 263, in executing
source = cls.for_frame(frame)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 212, in for_frame
return cls.for_filename(frame.f_code.co_filename, frame.f_globals or {})
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 225, in for_filename
result = source_cache[filename] = cls(filename, lines)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/stack_data/core.py", line 81, in __init__
self.asttokens()
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/executing.py", line 336, in asttokens
return ASTTokens(
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/asttokens.py", line 65, in __init__
self.mark_tokens(self._tree)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/asttokens.py", line 76, in mark_tokens
MarkTokens(self).visit_tree(root_node)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/mark_tokens.py", line 49, in visit_tree
util.visit_tree(node, self._visit_before_children, self._visit_after_children)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/util.py", line 186, in visit_tree
ret = postvisit(current, par_value, value)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/mark_tokens.py", line 92, in _visit_after_children
nfirst, nlast = self._methods.get(self, node.__class__)(node, first, last)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/mark_tokens.py", line 330, in visit_keyword
util.expect_token(name, token.NAME, node.arg)
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/asttokens/util.py", line 56, in expect_token
raise ValueError("Expected token %s, got %s on line %s col %s" % (
ValueError: Expected token NAME:'co_flags', got NAME:'new_code' on line 144 col 9
If you suspect this is an IPython 8.0.0.dev bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@python.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
Process Python exited abnormally with code 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment