Skip to content

Cell fails to complete execution when using IPython 8.0 and pygments < 2.4.0 #8786

@bkc

Description

@bkc

Issue Type: Bug

Jupyter Extension Version: 2022.1.1001614873.
Python Extension Verison: 2021.12.1559732655.

Create a Jupyter notebook using the 'local default' engine built into vscode

write some python code in cells

make a mistake in the python code that will raise an exception when executed

execute the code

the cell code runs, but then the editor 'hangs' while running the code. clicking 'restart' is required.

see this in the jupyter log window

Info 12:06:22: Execute Cell 8 ~/notebooks/mwd/pierbridge-carrierlist-to-csv.ipynb
Warn 12:06:22: StdErr from Kernel Process [IPKernelApp] ERROR | Exception in message handler:

Warn 12:06:22: StdErr from Kernel Process Traceback (most recent call last):

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3251, in run_code

Warn 12:06:22: StdErr from Kernel Process     exec(code_obj, self.user_global_ns, self.user_ns)

Warn 12:06:22: StdErr from Kernel Process   File "/tmp/ipykernel_11358/939499826.py", line 1, in <module>

Warn 12:06:22: StdErr from Kernel Process     process_carriers()

Warn 12:06:22: StdErr from Kernel Process NameError: name 'process_carriers' is not defined

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process During handling of the above exception, another exception occurred:

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process Traceback (most recent call last):

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 1934, in showtraceback

Warn 12:06:22: StdErr from Kernel Process     stb = value._render_traceback_()

Warn 12:06:22: StdErr from Kernel Process AttributeError: 'NameError' object has no attribute '_render_traceback_'

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process During handling of the above exception, another exception occurred:

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process Traceback (most recent call last):

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3191, in run_ast_nodes

Warn 12:06:22: StdErr from Kernel Process     if await self.run_code(code, result, async_=asy):

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3268, in run_code

Warn 12:06:22: StdErr from Kernel Process     self.showtraceback(running_compiled_code=True)

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 1936, in showtraceback

Warn 12:06:22: StdErr from Kernel Process     stb = self.InteractiveTB.structured_traceback(etype,

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 1105, in structured_traceback

Warn 12:06:22: StdErr from Kernel Process     return FormattedTB.structured_traceback(

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 999, in structured_traceback

Warn 12:06:22: StdErr from Kernel Process     return VerboseTB.structured_traceback(

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 852, in structured_traceback

Warn 12:06:22: StdErr from Kernel Process     formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 786, in format_exception_as_a_whole

Warn 12:06:22: StdErr from Kernel Process     records = self.get_records(etb, number_of_lines_of_context, tb_offset)

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 830, in get_records

Warn 12:06:22: StdErr from Kernel Process     style = stack_data.style_with_executing_node(style, "bg:ansiyellow")

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/stack_data/core.py", line 412, in style_with_executing_node

Warn 12:06:22: StdErr from Kernel Process     class NewStyle(style):

Warn 12:06:22: StdErr from Kernel Process   File "/usr/lib/python3/dist-packages/pygments/style.py", line 91, in __new__

Warn 12:06:22: StdErr from Kernel Process     ndef[4] = colorformat(styledef[3:])

Warn 12:06:22: StdErr from Kernel Process   File "/usr/lib/python3/dist-packages/pygments/style.py", line 58, in colorformat

Warn 12:06:22: StdErr from Kernel Process     assert False, "wrong color format %r" % text

Warn 12:06:22: StdErr from Kernel Process AssertionError: wrong color format 'ansiyellow'

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process During handling of the above exception, another exception occurred:

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process Traceback (most recent call last):

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 1934, in showtraceback

Warn 12:06:22: StdErr from Kernel Process     stb = value._render_traceback_()

Warn 12:06:22: StdErr from Kernel Process AttributeError: 'AssertionError' object has no attribute '_render_traceback_'

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process During handling of the above exception, another exception occurred:

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process Traceback (most recent call last):

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2814, in _run_cell

Warn 12:06:22: StdErr from Kernel Process     return runner(coro)

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/async_helpers.py", line 129, in _pseudo_sync_runner

Warn 12:06:22: StdErr from Kernel Process     coro.send(None)

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3012, in run_cell_async

Warn 12:06:22: StdErr from Kernel Process     has_raised = await self.run_ast_nodes(code_ast.body, cell_name,

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3210, in run_ast_nodes

Warn 12:06:22: StdErr from Kernel Process     self.showtraceback()

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 1936, in showtraceback

Warn 12:06:22: StdErr from Kernel Process     stb = self.InteractiveTB.structured_traceback(etype,

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 1105, in structured_traceback

Warn 12:06:22: StdErr from Kernel Process     return FormattedTB.structured_traceback(

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 999, in structured_traceback

Warn 12:06:22: StdErr from Kernel Process     return VerboseTB.structured_traceback(

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 852, in structured_traceback

Warn 12:06:22: StdErr from Kernel Process     formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 786, in format_exception_as_a_whole

Warn 12:06:22: StdErr from Kernel Process     records = self.get_records(etb, number_of_lines_of_context, tb_offset)

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 830, in get_records

Warn 12:06:22: StdErr from Kernel Process     style = stack_data.style_with_executing_node(style, "bg:ansiyellow")

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/stack_data/core.py", line 412, in style_with_executing_node

Warn 12:06:22: StdErr from Kernel Process     class NewStyle(style):

Warn 12:06:22: StdErr from Kernel Process   File "/usr/lib/python3/dist-packages/pygments/style.py", line 91, in __new__

Warn 12:06:22: StdErr from Kernel Process     ndef[4] = colorformat(styledef[3:])

Warn 12:06:22: StdErr from Kernel Process   File "/usr/lib/python3/dist-packages/pygments/style.py", line 58, in colorformat

Warn 12:06:22: StdErr from Kernel Process     assert False, "wrong color format %r" % text

Warn 12:06:22: StdErr from Kernel Process AssertionError: wrong color format 'ansiyellow'

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process During handling of the above exception, another exception occurred:

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process Traceback (most recent call last):

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 1934, in showtraceback

Warn 12:06:22: StdErr from Kernel Process     stb = value._render_traceback_()

Warn 12:06:22: StdErr from Kernel Process AttributeError: 'AssertionError' object has no attribute '_render_traceback_'

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process During handling of the above exception, another exception occurred:

Warn 12:06:22: StdErr from Kernel Process 

Warn 12:06:22: StdErr from Kernel Process Traceback (most recent call last):

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/ipykernel/kernelbase.py", line 357, in dispatch_shell

Warn 12:06:22: StdErr from Kernel Process     await result

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/ipykernel/kernelbase.py", line 652, in execute_request

Warn 12:06:22: StdErr from Kernel Process     reply_content = await reply_content

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/ipykernel/ipkernel.py", line 353, in do_execute

Warn 12:06:22: StdErr from Kernel Process     res = shell.run_cell(code, store_history=store_history, silent=silent)

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/ipykernel/zmqshell.py", line 532, in run_cell

Warn 12:06:22: StdErr from Kernel Process     return super().run_cell(*args, **kwargs)

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2768, in run_cell

Warn 12:06:22: StdErr from Kernel Process     result = self._run_cell(

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 2819, in _run_cell

Warn 12:06:22: StdErr from Kernel Process     self.showtraceback(running_compiled_code=True)

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 1936, in showtraceback

Warn 12:06:22: StdErr from Kernel Process     stb = self.InteractiveTB.structured_traceback(etype,

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 1105, in structured_traceback

Warn 12:06:22: StdErr from Kernel Process     return FormattedTB.structured_traceback(

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 999, in structured_traceback

Warn 12:06:22: StdErr from Kernel Process     return VerboseTB.structured_traceback(

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 852, in structured_traceback

Warn 12:06:22: StdErr from Kernel Process     formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 786, in format_exception_as_a_whole

Warn 12:06:22: StdErr from Kernel Process     records = self.get_records(etb, number_of_lines_of_context, tb_offset)

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/IPython/core/ultratb.py", line 830, in get_records

Warn 12:06:22: StdErr from Kernel Process     style = stack_data.style_with_executing_node(style, "bg:ansiyellow")

Warn 12:06:22: StdErr from Kernel Process   File "/home/redacted-name/.local/lib/python3.9/site-packages/stack_data/core.py", line 412, in style_with_executing_node

Warn 12:06:22: StdErr from Kernel Process     class NewStyle(style):

Warn 12:06:22: StdErr from Kernel Process   File "/usr/lib/python3/dist-packages/pygments/style.py", line 91, in __new__

Warn 12:06:22: StdErr from Kernel Process     ndef[4] = colorformat(styledef[3:])

Warn 12:06:22: StdErr from Kernel Process   File "/usr/lib/python3/dist-packages/pygments/style.py", line 58, in colorformat

Warn 12:06:22: StdErr from Kernel Process     assert False, "wrong color format %r" % text

Warn 12:06:22: StdErr from Kernel Process AssertionError: wrong color format 'ansiyellow'

Extension version: 1.0.4
VS Code version: Code - Insiders 1.64.0-insider (0c6d1e9f7ef648cfa50733abb62388bc0791856a, 2022-01-20T06:29:50.054Z)
OS version: Linux x64 5.4.0-94-generic
Restricted Mode: No
Remote OS version: Linux x64 5.0.0-37-generic
Remote OS version: Linux x64 5.0.0-37-generic
Remote OS version: Linux x64 5.0.0-37-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 x 2775)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 31.31GB (0.51GB free)
Process Argv --crash-reporter-id 474eb73e-a65a-4368-951f-e20a8cf1c5f1
Screen Reader no
VM 0%
DESKTOP_SESSION awesome
XDG_CURRENT_DESKTOP undefined
XDG_SESSION_DESKTOP awesome
XDG_SESSION_TYPE x11
Item Value
Remote SSH: bob4
OS Linux x64 5.0.0-37-generic
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 3401)
Memory (System) 47.01GB (7.49GB free)
VM 0%
Item Value
Remote SSH: bob4
OS Linux x64 5.0.0-37-generic
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 3401)
Memory (System) 47.01GB (7.49GB free)
VM 0%
Item Value
Remote SSH: bob4
OS Linux x64 5.0.0-37-generic
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 3401)
Memory (System) 47.01GB (7.49GB free)
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes516:30244333
pythonvspyl392:30422396
pythontb:30258533
pythonvspyt551cf:30291413
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
pythonvspyt200:30323110
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30404738
wslgetstarted:30421357
vscop804cf:30404767
vscop940:30404999
vsclayoutctrt:30405800
azactmsalcf:30409288
pythonvsnew555:30424890
vsbas813:30426126

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions