You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL,DR: a file called xml.py blocks the start of interactive python.
I have a folder with two files in: file1.py and xml.py. Both have this content
# %%importnumpyasnpprint(np.zeros((3,3)))
# %%
when I start to run the this cell interactively in either file, I get this error message
The kernel failed to start due to the missing module 'xml.dom'. Consider installing this module.
Click here for more info.
with this traceback in the logs
stdErr: 'Traceback (most recent call last):\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/runpy.py", line 196, in _run_module_as_main\n' +
' return _run_code(code, main_globals, None,\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/runpy.py", line 86, in _run_code\n' +
' exec(code, run_globals)\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/ipykernel_launcher.py", line 15, in <module>\n' +
' from ipykernel import kernelapp as app\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 18, in <module>\n' +
' from IPython.core.application import (\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/IPython/__init__.py", line 53, in <module>\n' +
' from .terminal.embed import embed\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/IPython/terminal/embed.py", line 16, in <module>\n' +
' from IPython.terminal.interactiveshell import TerminalInteractiveShell\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/IPython/terminal/interactiveshell.py", line 29, in <module>\n' +
' from prompt_toolkit.auto_suggest import AutoSuggestFromHistory\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/prompt_toolkit/__init__.py", line 16, in <module>\n' +
' from .application import Application\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/prompt_toolkit/application/__init__.py", line 1, in <module>\n' +
' from .application import Application\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 42, in <module>\n' +
' from prompt_toolkit.buffer import Buffer\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/prompt_toolkit/buffer.py", line 37, in <module>\n' +
' from .completion import (\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/prompt_toolkit/completion/__init__.py", line 1, in <module>\n' +
' from .base import (\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/prompt_toolkit/completion/base.py", line 9, in <module>\n' +
' from prompt_toolkit.formatted_text import AnyFormattedText, StyleAndTextTuples\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/prompt_toolkit/formatted_text/__init__.py", line 23, in <module>\n' +
' from .html import HTML\n' +
' File "/Users/cornelius/opt/anaconda3/envs/general/lib/python3.10/site-packages/prompt_toolkit/formatted_text/html.py", line 1, in <module>\n' +
' import xml.dom.minidom as minidom\n' +
"ModuleNotFoundError: No module named 'xml.dom'; 'xml' is not a package\n"
}
info 12:40:38.212: Process Execution: > ~/opt/anaconda3/envs/general/bin/python -c "import ipykernel"
> ~/opt/anaconda3/envs/general/bin/python -c "import ipykernel"
If I rename xml.py to something else, e.g. learnxmlparsing.py everything works fine.
VS Code version: Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630, 2022-06-14T12:52:13.188Z)
OS version: Darwin x64 21.5.0
Restricted Mode: No
System Info
Item
Value
CPUs
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz (8 x 2900)
This sounds like a built-in module being overridden, which means you just wouldn't be able to have a file with that name, but it looks like those are typically caused by importFailoures, wheras moduleNotFoundFailures have much less clear error messages.
Issue Type: Bug
TL,DR: a file called
xml.py
blocks the start of interactive python.I have a folder with two files in:
file1.py
andxml.py
. Both have this contentwhen I start to run the this cell interactively in either file, I get this error message
with this traceback in the logs
If I rename
xml.py
to something else, e.g.learnxmlparsing.py
everything works fine.VS Code version: Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630, 2022-06-14T12:52:13.188Z)
OS version: Darwin x64 21.5.0
Restricted Mode: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Extensions (27)
The text was updated successfully, but these errors were encountered: