Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100) #8630

Closed
liudonghua123 opened this issue Jan 2, 2022 · 21 comments
Closed

Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100) #8630

liudonghua123 opened this issue Jan 2, 2022 · 21 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@liudonghua123
Copy link

liudonghua123 commented Jan 2, 2022

Environment data

  • VS Code version: 1.63.2
  • Jupyter Extension version (available under the Extensions sidebar): v2021.11.1001550889
  • Python Extension version (available under the Extensions sidebar): v2021.12.1559732655
  • OS (Windows | Mac | Linux distro) and version: Windows_NT x64 10.0.22000
  • Python and/or Anaconda version: Python 3.10.1
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Jupyter server running: Local | Remote | N/A: Local

vscode version details


Version: 1.63.2 (user setup)
Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
Date: 2021-12-15T09:40:02.816Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.22000

I installed python 3.10 from ms store. and then I install jupyter successed. Then I create a python script named test.py which contains the following demo code.

# %% [markdown]
# # Hello World

# %%
print('Hello, World!')
pip install --upgrade jupyter
D:\code\python>python --version
Python 3.10.1

D:\code\python>pip install --upgrade  jupyter
Collecting jupyter
  Using cached jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Collecting jupyter-console
  Using cached jupyter_console-6.4.0-py3-none-any.whl (22 kB)
Collecting ipykernel
  Using cached ipykernel-6.6.0-py3-none-any.whl (126 kB)
Collecting ipywidgets
  Using cached ipywidgets-7.6.5-py2.py3-none-any.whl (121 kB)
Collecting nbconvert
  Using cached nbconvert-6.3.0-py3-none-any.whl (556 kB)
Collecting notebook
  Using cached notebook-6.4.6-py3-none-any.whl (9.9 MB)
Collecting qtconsole
  Using cached qtconsole-5.2.2-py3-none-any.whl (120 kB)
Collecting traitlets<6.0,>=5.1.0
  Using cached traitlets-5.1.1-py3-none-any.whl (102 kB)
Collecting ipython>=7.23.1
  Using cached ipython-7.30.1-py3-none-any.whl (791 kB)
Collecting debugpy<2.0,>=1.0.0
  Using cached debugpy-1.5.1-cp310-cp310-win_amd64.whl (4.4 MB)
Collecting tornado<7.0,>=4.2
  Using cached tornado-6.1-cp310-cp310-win_amd64.whl
Collecting matplotlib-inline<0.2.0,>=0.1.0
  Using cached matplotlib_inline-0.1.3-py3-none-any.whl (8.2 kB)
Collecting jupyter-client<8.0
  Using cached jupyter_client-7.1.0-py3-none-any.whl (129 kB)
Collecting backcall
  Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting jedi>=0.16
  Using cached jedi-0.18.1-py2.py3-none-any.whl (1.6 MB)
Collecting colorama
  Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting pygments
  Using cached Pygments-2.11.1-py3-none-any.whl (1.1 MB)
Collecting pickleshare
  Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Requirement already satisfied: setuptools>=18.5 in c:\program files\windowsapps\pythonsoftwarefoundation.python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages (from ipython>=7.23.1->ipykernel->jupyter) (58.1.0)
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
  Using cached prompt_toolkit-3.0.24-py3-none-any.whl (374 kB)
Collecting decorator
  Using cached decorator-5.1.0-py3-none-any.whl (9.1 kB)
Collecting parso<0.9.0,>=0.8.0
  Using cached parso-0.8.3-py2.py3-none-any.whl (100 kB)
Collecting entrypoints
  Using cached entrypoints-0.3-py2.py3-none-any.whl (11 kB)
Collecting python-dateutil>=2.1
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting jupyter-core>=4.6.0
  Using cached jupyter_core-4.9.1-py3-none-any.whl (86 kB)
Collecting nest-asyncio>=1.5
  Using cached nest_asyncio-1.5.4-py3-none-any.whl (5.1 kB)
Collecting pyzmq>=13
  Using cached pyzmq-22.3.0-cp310-cp310-win_amd64.whl (1.1 MB)
Collecting pywin32>=1.0
  Using cached pywin32-303-cp310-cp310-win_amd64.whl (9.2 MB)
Collecting wcwidth
  Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting jupyterlab-widgets>=1.0.0
  Using cached jupyterlab_widgets-1.0.2-py3-none-any.whl (243 kB)
Collecting nbformat>=4.2.0
  Using cached nbformat-5.1.3-py3-none-any.whl (178 kB)
Collecting ipython-genutils~=0.2.0
  Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting widgetsnbextension~=3.5.0
  Using cached widgetsnbextension-3.5.2-py2.py3-none-any.whl (1.6 MB)
Collecting jsonschema!=2.5.0,>=2.4
  Using cached jsonschema-4.3.3-py3-none-any.whl (71 kB)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
  Using cached pyrsistent-0.18.0-cp310-cp310-win_amd64.whl
Collecting attrs>=17.4.0
  Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting terminado>=0.8.3
  Using cached terminado-0.12.1-py3-none-any.whl (15 kB)
Collecting Send2Trash>=1.8.0
  Using cached Send2Trash-1.8.0-py3-none-any.whl (18 kB)
Collecting argon2-cffi
  Using cached argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting prometheus-client
  Using cached prometheus_client-0.12.0-py2.py3-none-any.whl (57 kB)
Collecting jinja2
  Using cached Jinja2-3.0.3-py3-none-any.whl (133 kB)
Collecting pywinpty>=1.1.0
  Using cached pywinpty-1.1.6-cp310-none-win_amd64.whl (1.4 MB)
Collecting argon2-cffi-bindings
  Using cached argon2_cffi_bindings-21.2.0-cp36-abi3-win_amd64.whl (30 kB)
Collecting cffi>=1.0.1
  Using cached cffi-1.15.0-cp310-cp310-win_amd64.whl (180 kB)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl (15 kB)
Collecting defusedxml
  Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting nbclient<0.6.0,>=0.5.0
  Using cached nbclient-0.5.9-py3-none-any.whl (69 kB)
Collecting bleach
  Using cached bleach-4.1.0-py2.py3-none-any.whl (157 kB)
Collecting pandocfilters>=1.4.1
  Using cached pandocfilters-1.5.0-py2.py3-none-any.whl (8.7 kB)
Collecting testpath
  Using cached testpath-0.5.0-py3-none-any.whl (84 kB)
Collecting mistune<2,>=0.8.1
  Using cached mistune-0.8.4-py2.py3-none-any.whl (16 kB)
Collecting jupyterlab-pygments
  Using cached jupyterlab_pygments-0.1.2-py2.py3-none-any.whl (4.6 kB)
Collecting webencodings
  Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.6-py3-none-any.whl (97 kB)
Collecting qtpy
  Using cached QtPy-2.0.0-py3-none-any.whl (62 kB)
Installing collected packages: traitlets, six, pywin32, pyrsistent, attrs, wcwidth, tornado, pyzmq, python-dateutil, pyparsing, pycparser, parso, nest-asyncio, jupyter-core, jsonschema, ipython-genutils, entrypoints, webencodings, pygments, prompt-toolkit, pickleshare, packaging, nbformat, matplotlib-inline, MarkupSafe, jupyter-client, jedi, decorator, colorama, cffi, backcall, testpath, pywinpty, pandocfilters, nbclient, mistune, jupyterlab-pygments, jinja2, ipython, defusedxml, debugpy, bleach, argon2-cffi-bindings, terminado, Send2Trash, prometheus-client, nbconvert, ipykernel, argon2-cffi, notebook, widgetsnbextension, qtpy, jupyterlab-widgets, qtconsole, jupyter-console, ipywidgets, jupyter
Successfully installed MarkupSafe-2.0.1 Send2Trash-1.8.0 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 attrs-21.4.0 backcall-0.2.0 bleach-4.1.0 cffi-1.15.0 colorama-0.4.4 debugpy-1.5.1 decorator-5.1.0 defusedxml-0.7.1 entrypoints-0.3 ipykernel-6.6.0 ipython-7.30.1 ipython-genutils-0.2.0 ipywidgets-7.6.5 jedi-0.18.1 jinja2-3.0.3 jsonschema-4.3.3 jupyter-1.0.0 jupyter-client-7.1.0 jupyter-console-6.4.0 jupyter-core-4.9.1 jupyterlab-pygments-0.1.2 jupyterlab-widgets-1.0.2 matplotlib-inline-0.1.3 mistune-0.8.4 nbclient-0.5.9 nbconvert-6.3.0 nbformat-5.1.3 nest-asyncio-1.5.4 notebook-6.4.6 packaging-21.3 pandocfilters-1.5.0 parso-0.8.3 pickleshare-0.7.5 prometheus-client-0.12.0 prompt-toolkit-3.0.24 pycparser-2.21 pygments-2.11.1 pyparsing-3.0.6 pyrsistent-0.18.0 python-dateutil-2.8.2 pywin32-303 pywinpty-1.1.6 pyzmq-22.3.0 qtconsole-5.2.2 qtpy-2.0.0 six-1.16.0 terminado-0.12.1 testpath-0.5.0 tornado-6.1 traitlets-5.1.1 wcwidth-0.2.5 webencodings-0.5.1 widgetsnbextension-3.5.2
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the 'C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip' command.

D:\code\python>

Expected behaviour

Work as expected.

Actual behaviour

(code: 1073741845). Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100).
View Jupyter log for further details.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. run a simple python notebook script.

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

Jupyter Extension Version: 2021.11.1001550889.
Python Extension Verison: 2021.12.1559732655.
Info 11:42:11: Experimentation service retrieved: [object Object]
User belongs to experiment group 'jupyterTestcf'
User belongs to experiment group 'jupyterEnhancedDataViewer'
Info 11:42:11: ZMQ install verified.
Info 11:42:11: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
Info 11:42:13: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m pip list
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m pip list
Info 11:42:44: Creating controller for interactive with interpreter ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe
Info 11:42:44: Starting interactive window with controller ID ms-toolsai.jupyter/.jvsc74a57bd01e90f1d75b4a90568f109dbac2744b49ffb7db08d5da1e85a550aa60f9d04885.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.-m#ipykernel_launcher (Interactive)
Info 11:42:44: Setting setActiveController for vscode-interactive:Interactive-1.interactive
Info 11:42:44: Starting Notebook in kernel.ts id = .jvsc74a57bd01e90f1d75b4a90568f109dbac2744b49ffb7db08d5da1e85a550aa60f9d04885.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.-m#ipykernel_launcher
Info 11:42:44: Creating raw notebook for vscode-interactive:Interactive-1.interactive
Info 11:42:44: Getting preferred kernel for vscode-interactive:Interactive-1.interactive
Info 11:42:44: Computing working directory vscode-interactive:Interactive-1.interactive
Info 11:42:44: Starting raw kernel Python 3.10.1
Info 11:42:44: installMissingDependencies ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe
Info 11:42:44: IPykernel found previously in this enviornment ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe
Info 11:42:44: Kernel launching with ports 9010,9011,9012,9013,9014. Start port is 9000
Info 11:42:44: Launching kernel daemon for Python 3.10.1 64-bit (windows store) # ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe
Info 11:42:44: No custom variables for Kernel as interpreter is not conda, but is WindowsStore
Info 11:42:44: Creating daemon process for ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe with env variables count 0
Info 11:42:45: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 11:42:45: Registering dummy command feature
Info 11:42:45: Starting kernel from scratch
Warn 11:42:47: StdErr from Kernel Process C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.

Warn 11:42:47: StdErr from Kernel Process   warn(

Warn 11:42:47: StdErr from Kernel Process C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.

Warn 11:42:47: StdErr from Kernel Process   warn(

Warn 11:42:47: StdErr from Kernel Process Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)

Error 11:42:47: Kernel died o [Error]: The kernel died. View Jupyter [log](command:jupyter.viewOutput) for further details. 
Error: (code: 1073741845). Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)....
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:1023351
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:695951
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:696169
    at Immediate._onImmediate (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:697734)
    at processImmediate (internal/timers.js:461:21) {
  category: 'kerneldied',
  errorMessage: ' (code: 1073741845). Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100). \n',
  stdErr: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n',
  exitCode: 1073741845,
  reason: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n'
} C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
  warn(
C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.
  warn(
Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)

Error 11:42:47: KernelProcess Exit Exit - 1073741845, C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
  warn(
C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.
  warn(
Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)
 o [Error]: The kernel died. View Jupyter [log](command:jupyter.viewOutput) for further details. 
Error: (code: 1073741845). Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)....
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:1023351
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:695951
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:696169
    at Immediate._onImmediate (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:697734)
    at processImmediate (internal/timers.js:461:21) {
  category: 'kerneldied',
  errorMessage: ' (code: 1073741845). Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100). \n',
  stdErr: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n',
  exitCode: 1073741845,
  reason: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n'
}
Error 11:42:47: Disposing kernel process due to an error o [Error]: The kernel died. View Jupyter [log](command:jupyter.viewOutput) for further details. 
Error: (code: 1073741845). Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)....
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:1023351
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:695951
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:696169
    at Immediate._onImmediate (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:697734)
    at processImmediate (internal/timers.js:461:21) {
  category: 'kerneldied',
  errorMessage: ' (code: 1073741845). Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100). \n',
  stdErr: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n',
  exitCode: 1073741845,
  reason: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n'
}
Error 11:42:47: C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
  warn(
C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.
  warn(
Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)

Info 11:42:47: Dispose Kernel process
Info 11:42:47: kill daemon
Error 11:42:47: Failed to connect raw kernel session: Error: The kernel died. View Jupyter [log](command:jupyter.viewOutput) for further details. 
Error: (code: 1073741845). Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)....
Error 11:42:47: failed to create INotebook in kernel, UI Disabled = false o [Error]: The kernel died. View Jupyter [log](command:jupyter.viewOutput) for further details. 
Error: (code: 1073741845). Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)....
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:1023351
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:695951
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:696169
    at Immediate._onImmediate (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:697734)
    at processImmediate (internal/timers.js:461:21) {
  category: 'kerneldied',
  errorMessage: ' (code: 1073741845). Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100). \n',
  stdErr: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n',
  exitCode: 1073741845,
  reason: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n'
}
Error 11:42:47: failed to start INotebook in kernel, UI Disabled = false o [Error]: The kernel died. View Jupyter [log](command:jupyter.viewOutput) for further details. 
Error: (code: 1073741845). Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)....
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:1023351
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:695951
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:696169
    at Immediate._onImmediate (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:697734)
    at processImmediate (internal/timers.js:461:21) {
  category: 'kerneldied',
  errorMessage: ' (code: 1073741845). Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100). \n',
  stdErr: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n',
  exitCode: 1073741845,
  reason: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n'
}
Error 11:42:47: DataScience Error o [Error]: The kernel died. View Jupyter [log](command:jupyter.viewOutput) for further details. 
Error: (code: 1073741845). Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)....
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:1023351
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:695951
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:696169
    at Immediate._onImmediate (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:697734)
    at processImmediate (internal/timers.js:461:21) {
  category: 'kerneldied',
  errorMessage: ' (code: 1073741845). Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100). \n',
  stdErr: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n',
  exitCode: 1073741845,
  reason: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n'
}
Error 11:42:47: DataScience Error o [Error]: The kernel died. View Jupyter [log](command:jupyter.viewOutput) for further details. 
Error: (code: 1073741845). Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)....
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:1023351
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:695951
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:696169
    at Immediate._onImmediate (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:66:697734)
    at processImmediate (internal/timers.js:461:21) {
  category: 'kerneldied',
  errorMessage: ' (code: 1073741845). Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100). \n',
  stdErr: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n',
  exitCode: 1073741845,
  reason: `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.\r\n` +
    '  warn(\r\n' +
    `C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\traitlets\\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'c33d34a3-bf83-4ace-b4cd-7cc51e7b8333' instead of 'b"c33d34a3-bf83-4ace-b4cd-7cc51e7b8333"'.\r\n` +
    '  warn(\r\n' +
    'Bad file descriptor (C:\\projects\\libzmq\\src\\epoll.cpp:100)\n'
}
Info 11:43:20: Pre-warming kernel daemon for d:\code\node\playground
Info 11:43:20: IPykernel found previously in this enviornment ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe
Info 11:43:20: Creating daemon process for ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe with env variables count 0
Info 11:43:20: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 11:43:49: Disposing kernel .jvsc74a57bd01e90f1d75b4a90568f109dbac2744b49ffb7db08d5da1e85a550aa60f9d04885.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.-m#ipykernel_launcher for notebook vscode-interactive:Interactive-1.interactive due to selection of another kernel or closing of the notebook
Info 11:43:49: Dispose kernel file:///d%3A/code/node/playground/hello.py
Info 11:43:49: Notebook Closed vscode-interactive:Interactive-1.interactive
Info 11:43:49: Kernel got disposed as a result of closing the notebook vscode-interactive:Interactive-1.interactive
Info 11:43:49: Closing interactive window: vscode-interactive:Interactive-1.interactive

If I start jupyter outside vscode, it did not have such problems.

C:\Users\Liu.D.H>python -V
Python 3.10.1

C:\Users\Liu.D.H>jupyter notebook
[I 2022-01-02 12:41:09.189 LabApp] JupyterLab extension loaded from C:\Users\Liu.D.H\anaconda3\lib\site-packages\jupyterlab
[I 2022-01-02 12:41:09.189 LabApp] JupyterLab application directory is C:\Users\Liu.D.H\anaconda3\share\jupyter\lab
[I 12:41:09.195 NotebookApp] Serving notebooks from local directory: C:\Users\Liu.D.H
[I 12:41:09.195 NotebookApp] Jupyter Notebook 6.3.0 is running at:
[I 12:41:09.195 NotebookApp] http://localhost:8888/?token=1876d314b734191a982b48d68bd5ab04b2db7e3a5b86fc60
[I 12:41:09.196 NotebookApp]  or http://127.0.0.1:8888/?token=1876d314b734191a982b48d68bd5ab04b2db7e3a5b86fc60
[I 12:41:09.196 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:41:09.282 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///C:/Users/Liu.D.H/AppData/Roaming/jupyter/runtime/nbserver-25116-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=1876d314b734191a982b48d68bd5ab04b2db7e3a5b86fc60
     or http://127.0.0.1:8888/?token=1876d314b734191a982b48d68bd5ab04b2db7e3a5b86fc60
@liudonghua123 liudonghua123 added the bug Issue identified by VS Code Team member as probable bug label Jan 2, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Jan 4, 2022

Thanks for the bug. Does this directory actually exist?

C:\\projects\\libzmq\\src\

Your issue sounds similar to this one:
https://stackoverflow.com/questions/65733680/bad-file-descriptor-c-ci-zeromq-1602704446950-work-src-epoll-cpp100

My guess is that the path environment when we start the kernel is different from the path when you start it from the command line.

Can you close VS code and relaunch it from your same command line where jupyter worked?

Like so:

C:\Users\Liu.D.H>code

@rchiodo rchiodo assigned rchiodo and unassigned DonJayamanne Jan 4, 2022
@rchiodo rchiodo added info-needed Issue requires more information from poster and removed needs-triage labels Jan 4, 2022
@liudonghua123
Copy link
Author

@rchiodo Hi

Thanks for the bug. Does this directory actually exist?

I do not have this directory in my local environment.

My guess is that the path environment when we start the kernel is different from the path when you start it from the command line.

I tried this, but it is the same.

@rchiodo
Copy link
Contributor

rchiodo commented Jan 5, 2022

This issue makes it sound like a problem with 32 to 64 bit compatibility:
zeromq/pyzmq#1276

Meaning VS code is 64 bit but your python installation might be 32 bit. Can you run '~\AppData\Local\Microsoft\WindowsApps\python3.10.exe' from a command line and tell me what the status output is?

Example for me - my store version:

C:\Users\aku91>C:\\Users\\aku91\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\python.exe
Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Example for me - 32 bit version I have as well:

C:\Users\aku91>C:\\Users\\aku91\\AppData\\Local\\Programs\\Python\\Python39-32\\python.exe
Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:04:37) [MSC v.1929 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 

@liudonghua123
Copy link
Author

@rchiodo Thanks for getting into this issue, I have only one python 3.10 64bit installed on my system. And I can confirm that I used the same python in vscode and in outside terminal.

@rchiodo
Copy link
Contributor

rchiodo commented Jan 5, 2022

Sorry but I'm out of ideas. There's a bug somewhere in pyzmq. You could try using this setting instead:

"jupyter.disableZMQSupport": true,

That forces us to use jupyter to launch a kernel instead of us launching it directly (slower way to start a kernel).

If that doesn't work, then I'd suggest using 3.9 instead. PyZmq may not be vetted for 3.10 yet.

@liudonghua123
Copy link
Author

I also tried "jupyter.disableZMQSupport": true, but not works.

output logs
Jupyter Extension Version: 2021.11.1001550889.
Python Extension Verison: 2021.12.1559732655.
Info 11:42:37: Experimentation service retrieved: [object Object]
User belongs to experiment group 'jupyterTestcf'
User belongs to experiment group 'jupyterEnhancedDataViewer'
Info 11:42:38: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
Info 11:42:41: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m pip list
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m pip list
Info 11:42:41: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -c "import jupyter"
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -c "import jupyter"
Info 11:42:41: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -c "import notebook"
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -c "import notebook"
Info 11:42:42: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m jupyter kernelspec --version
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m jupyter kernelspec --version
Info 11:42:50: Creating controller for interactive with interpreter ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe
Info 11:42:50: Starting interactive window with controller ID ms-toolsai.jupyter/.jvsc74a57bd01e90f1d75b4a90568f109dbac2744b49ffb7db08d5da1e85a550aa60f9d04885.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.-m#ipykernel_launcher (Interactive)
Info 11:42:50: Setting setActiveController for vscode-interactive:Interactive-1.interactive
Info 11:42:51: Starting Notebook in kernel.ts id = .jvsc74a57bd01e90f1d75b4a90568f109dbac2744b49ffb7db08d5da1e85a550aa60f9d04885.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.-m#ipykernel_launcher
Info 11:42:51: Checking for server existence.
Info 11:42:51: Checking for server usability.
Info 11:42:51: Starting notebook server.
Info 11:42:51: Connecting to server
Info 11:42:51: Launching server
Info 11:42:51: Starting Notebook
Info 11:42:51: Generating custom default config at C:\Users\LIUD~1.H\AppData\Local\Temp\64fbf384-1441-4fff-a5b2-3dbfb3b6bbb8\jupyter_notebook_config.py
Info 11:42:51: Starting Jupyter Notebook
Starting Jupyter from ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe with command line --no-browser --notebook-dir="d:\\code\\node\\playground" --config=C:\Users\LIUD~1.H\AppData\Local\Temp\64fbf384-1441-4fff-a5b2-3dbfb3b6bbb8\jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
Info 11:42:51: Creating daemon pool for ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe with env variables count 0
Info 11:42:51: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 11:42:51: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 11:42:51: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 11:42:51: Registering dummy command feature
Info 11:42:52: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe (daemon) -m jupyter notebook --no-browser --notebook-dir="d:\\code\\node\\playground" --config=C:\Users\LIUD~1.H\AppData\Local\Temp\64fbf384-1441-4fff-a5b2-3dbfb3b6bbb8\jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe (daemon) -m jupyter notebook --no-browser --notebook-dir="d:\\code\\node\\playground" --config=C:\Users\LIUD~1.H\AppData\Local\Temp\64fbf384-1441-4fff-a5b2-3dbfb3b6bbb8\jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
Info 11:42:52: Waiting for Jupyter Notebook
C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'd:\\\\code\\\\node\\\\playground' instead of '"d:\\\\code\\\\node\\\\playground"' if you require traitlets >=5.
  warn(
Info 11:42:55: C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'd:\\\\code\\\\node\\\\playground' instead of '"d:\\\\code\\\\node\\\\playground"' if you require traitlets >=5.
  warn(

[I 11:42:56.167 NotebookApp] Serving notebooks from local directory: d:\\code\\node\\playground
Info 11:42:56: C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'd:\\\\code\\\\node\\\\playground' instead of '"d:\\\\code\\\\node\\\\playground"' if you require traitlets >=5.
  warn(
[I 11:42:56.167 NotebookApp] Serving notebooks from local directory: d:\\code\\node\\playground

[I 11:42:56.168 NotebookApp] Jupyter Notebook 6.4.6 is running at:
Info 11:42:56: C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'd:\\\\code\\\\node\\\\playground' instead of '"d:\\\\code\\\\node\\\\playground"' if you require traitlets >=5.
  warn(
[I 11:42:56.167 NotebookApp] Serving notebooks from local directory: d:\\code\\node\\playground
[I 11:42:56.168 NotebookApp] Jupyter Notebook 6.4.6 is running at:

[I 11:42:56.168 NotebookApp] http://localhost:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62
Info 11:42:56: C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'd:\\\\code\\\\node\\\\playground' instead of '"d:\\\\code\\\\node\\\\playground"' if you require traitlets >=5.
  warn(
[I 11:42:56.167 NotebookApp] Serving notebooks from local directory: d:\\code\\node\\playground
[I 11:42:56.168 NotebookApp] Jupyter Notebook 6.4.6 is running at:
[I 11:42:56.168 NotebookApp] http://localhost:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62

Info 11:42:56: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe (daemon) c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\pythonFiles\vscode_datascience_helpers\getServerInfo.py
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe (daemon) c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\pythonFiles\vscode_datascience_helpers\getServerInfo.py
[I 11:42:56.168 NotebookApp]  or http://127.0.0.1:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62
Info 11:42:56: C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'd:\\\\code\\\\node\\\\playground' instead of '"d:\\\\code\\\\node\\\\playground"' if you require traitlets >=5.
  warn(
[I 11:42:56.167 NotebookApp] Serving notebooks from local directory: d:\\code\\node\\playground
[I 11:42:56.168 NotebookApp] Jupyter Notebook 6.4.6 is running at:
[I 11:42:56.168 NotebookApp] http://localhost:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62
[I 11:42:56.168 NotebookApp]  or http://127.0.0.1:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62

Info 11:42:56: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe (daemon) c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\pythonFiles\vscode_datascience_helpers\getServerInfo.py
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe (daemon) c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\pythonFiles\vscode_datascience_helpers\getServerInfo.py
[I 11:42:56.168 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Info 11:42:56: C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'd:\\\\code\\\\node\\\\playground' instead of '"d:\\\\code\\\\node\\\\playground"' if you require traitlets >=5.
  warn(
[I 11:42:56.167 NotebookApp] Serving notebooks from local directory: d:\\code\\node\\playground
[I 11:42:56.168 NotebookApp] Jupyter Notebook 6.4.6 is running at:
[I 11:42:56.168 NotebookApp] http://localhost:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62
[I 11:42:56.168 NotebookApp]  or http://127.0.0.1:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62
[I 11:42:56.168 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

[C 11:42:56.229 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///C:/Users/Liu.D.H/AppData/Roaming/jupyter/runtime/nbserver-30848-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62
     or http://127.0.0.1:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62
Info 11:42:56: C:\Users\Liu.D.H\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'd:\\\\code\\\\node\\\\playground' instead of '"d:\\\\code\\\\node\\\\playground"' if you require traitlets >=5.
  warn(
[I 11:42:56.167 NotebookApp] Serving notebooks from local directory: d:\\code\\node\\playground
[I 11:42:56.168 NotebookApp] Jupyter Notebook 6.4.6 is running at:
[I 11:42:56.168 NotebookApp] http://localhost:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62
[I 11:42:56.168 NotebookApp]  or http://127.0.0.1:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62
[I 11:42:56.168 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:42:56.229 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///C:/Users/Liu.D.H/AppData/Roaming/jupyter/runtime/nbserver-30848-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62
     or http://127.0.0.1:8888/?token=64bc491980d53042208a14d105423f303ea8b1ecb883ed62

Info 11:42:57: Connecting to process server
Info 11:42:57: Connecting server kernel http://localhost:8888/
Info 11:42:57: Creating server with settings : {"baseUrl":"http://localhost:8888/","appUrl":"","wsUrl":"ws://localhost:8888/","token":"64bc491980d53042208a14d105423f303ea8b1ecb883ed62","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 11:42:57: Connection complete server
Info 11:42:57: Server started.
Info 11:42:57: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe (daemon) c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\pythonFiles\vscode_datascience_helpers\getServerInfo.py
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe (daemon) c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\pythonFiles\vscode_datascience_helpers\getServerInfo.py
Info 11:42:57: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe (daemon) c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\pythonFiles\vscode_datascience_helpers\getServerInfo.py
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe (daemon) c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\pythonFiles\vscode_datascience_helpers\getServerInfo.py
[I 11:42:57.510 NotebookApp] Creating new notebook in 
Info 11:42:57: installMissingDependencies ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe
Info 11:42:57: IPykernel found previously in this enviornment ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe
Info 11:42:57: RegisterKernel for .jvsc74a57bd01e90f1d75b4a90568f109dbac2744b49ffb7db08d5da1e85a550aa60f9d04885.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.-m#ipykernel_launcher
Info 11:42:57: Spec argv[0] updated from 'python' to '~\AppData\Local\Microsoft\WindowsApps\python3.10.exe'
Info 11:42:57: Starting a new session for kernel id = .jvsc74a57bd01e90f1d75b4a90568f109dbac2744b49ffb7db08d5da1e85a550aa60f9d04885.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\python3.10.exe.-m#ipykernel_launcher, name = python3101jvsc74a57bd01e90f1d75b4a90568f109dbac2744b49ffb7db08d5da1e85a550aa60f9d04885
Error 11:42:58: Failed to change kernel, re-throwing b [Error]: 
    at new o (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:33604)
    at new b (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:51:176460)
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:38:62628
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
    at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
    at ClientRequest.emit (events.js:315:20)
    at Socket.socketErrorListener (_http_client.js:469:9)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  category: 'unknown',
  originalException: FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
      at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
      at ClientRequest.emit (events.js:315:20)
      at Socket.socketErrorListener (_http_client.js:469:9)
      at Socket.emit (events.js:315:20)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)
}
Error 11:42:58: failed to create INotebook in kernel, UI Disabled = false b [Error]: 
    at new o (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:33604)
    at new b (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:51:176460)
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:38:62628
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
    at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
    at ClientRequest.emit (events.js:315:20)
    at Socket.socketErrorListener (_http_client.js:469:9)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  category: 'unknown',
  originalException: FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
      at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
      at ClientRequest.emit (events.js:315:20)
      at Socket.socketErrorListener (_http_client.js:469:9)
      at Socket.emit (events.js:315:20)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)
}
Error 11:42:58: DataScience Error b [Error]: 
    at new o (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:33604)
    at new b (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:51:176460)
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:38:62628
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
    at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
    at ClientRequest.emit (events.js:315:20)
    at Socket.socketErrorListener (_http_client.js:469:9)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  category: 'unknown',
  originalException: FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
      at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
      at ClientRequest.emit (events.js:315:20)
      at Socket.socketErrorListener (_http_client.js:469:9)
      at Socket.emit (events.js:315:20)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)
}
Error 11:42:58: failed to start INotebook in kernel, UI Disabled = false b [Error]: 
    at new o (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:33604)
    at new b (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:51:176460)
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:38:62628
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
    at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
    at ClientRequest.emit (events.js:315:20)
    at Socket.socketErrorListener (_http_client.js:469:9)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  category: 'unknown',
  originalException: FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
      at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
      at ClientRequest.emit (events.js:315:20)
      at Socket.socketErrorListener (_http_client.js:469:9)
      at Socket.emit (events.js:315:20)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)
}
Error 11:42:58: DataScience Error b [Error]: 
    at new o (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:33604)
    at new b (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:51:176460)
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:38:62628
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
    at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
    at ClientRequest.emit (events.js:315:20)
    at Socket.socketErrorListener (_http_client.js:469:9)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  category: 'unknown',
  originalException: FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
      at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
      at ClientRequest.emit (events.js:315:20)
      at Socket.socketErrorListener (_http_client.js:469:9)
      at Socket.emit (events.js:315:20)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)
}
Error 11:42:58: DataScience Error b [Error]: 
    at new o (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:33604)
    at new b (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:51:176460)
    at c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:38:62628
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
    at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
    at ClientRequest.emit (events.js:315:20)
    at Socket.socketErrorListener (_http_client.js:469:9)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  category: 'unknown',
  originalException: FetchError: request to http://localhost:8888/api/sessions?1641440577830 failed, reason: read ECONNRESET
      at ClientRequest.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:16:343322)
      at ClientRequest.emit (events.js:315:20)
      at Socket.socketErrorListener (_http_client.js:469:9)
      at Socket.emit (events.js:315:20)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)
}
Warn 11:42:58: Daemon Processed died with exit code
Error 11:42:58: Daemon Connection errored 1073741845
Info 11:42:58: Process Execution: > ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~\AppData\Local\Microsoft\WindowsApps\python3.10.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Error 11:42:58: Jupyter server crashed. Unable to connect. 
Error code from jupyter: 1073741845
Info 11:42:58: Shutting down notebooks
Info 11:42:58: Shut down session manager : existing
Info 11:42:58: Disposing session manager
Info 11:42:58: SessionManager - dispose contents manager
Info 11:42:58: ShutdownSessionAndConnection - dispose session manager
Error 11:42:58: Failed to run jupyter as observable with args notebook --no-browser --notebook-dir="d:\\code\\node\\playground" --config=C:\Users\LIUD~1.H\AppData\Local\Temp\64fbf384-1441-4fff-a5b2-3dbfb3b6bbb8\jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0 h [Error]: Daemon Processed died with exit code, With Error: 1073741845
    at e (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:38:117327)
    at ChildProcess.<anonymous> (c:\Users\Liu.D.H\.vscode\extensions\ms-toolsai.jupyter-2021.11.1001550889\out\client\extension.js:38:117692)
    at ChildProcess.emit (events.js:327:22)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
  category: 'daemon'
}
Failed to run jupyter as observable with args notebook --no-browser --notebook-dir="d:\\code\\node\\playground" --config=C:\Users\LIUD~1.H\AppData\Local\Temp\64fbf384-1441-4fff-a5b2-3dbfb3b6bbb8\jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100)
Info 11:42:58: Finished disposing jupyter session manager
Info 11:42:58: Shutdown server - dispose conn info
Video_2022-01-06_114337-converted.mp4

@rchiodo
Copy link
Contributor

rchiodo commented Jan 6, 2022

If you start jupyter yourself, can you actually run a notebook?

Your video showed you starting the server but not actually running a notebook. We're failing when starting a kernel, which for jupyter happens after that point.

@liudonghua123
Copy link
Author

If you start jupyter yourself, can you actually run a notebook?

Yes, If I started jupyter myself, I can run a notebook using python or other kernels.

Video_2022-01-07_083124-converted.mp4

@rchiodo
Copy link
Contributor

rchiodo commented Jan 7, 2022

In jupyter itself, can you create a notebook with the 'Windows store' kernel?

And if that doesn't work, when you create a notebook with the other kernel, can you run this code:

import sys
print(sys.executable)

@liudonghua123
Copy link
Author

Yes, I found the actural python kernel used is anaconda instead of windows-store python even I use windows-store python to start jupyter. So the problem is with jupyter in my windows-store python.

image

image

@liudonghua123
Copy link
Author

I have fixed my problems, I found some workarounds on https://programmerah.com/bad-file-descriptorccizeromq-1602704446950worksrcepoll-cpp100-41232/, https://discourse.jupyter.org/t/unable-to-run-jupyter-notebook-after-update-localhost/10764?u=fomightez. Now I can run python/markdown code blocks on vscode.

pip uninstall pyzmq
pip install pyzmq==19.0.2 --user

image

You can check the version pyzmq current used via zmq.__version__, the default version when install jupyter is 22.3.0. When you tried to uninstall it, you may have some errors, just ignore it.

C:\Users\Liu.D.H>python
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import zmq
>>> zmq.__version__
'22.3.0'
>>> exit()

C:\Users\Liu.D.H>pip uninstall pyzmq
Found existing installation: pyzmq 22.3.0
Uninstalling pyzmq-22.3.0:
  Would remove:
    c:\users\liu.d.h\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages\pyzmq-22.3.0.dist-info\*
    c:\users\liu.d.h\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages\pyzmq.libs\.load-order-pyzmq-22.3.0
    c:\users\liu.d.h\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages\pyzmq.libs\libsodium-138090d4.dll
    c:\users\liu.d.h\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages\pyzmq.libs\libzmq-v142-mt-4_3_4-4e355e3e.dll
    c:\users\liu.d.h\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages\pyzmq.libs\msvcp140.dll
    c:\users\liu.d.h\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages\pyzmq.libs\vcruntime140.dll
    c:\users\liu.d.h\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages\pyzmq.libs\vcruntime140_1.dll
    c:\users\liu.d.h\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages\zmq\*
Proceed (Y/n)? y
  Successfully uninstalled pyzmq-22.3.0
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\cli\base_command.py", line 173, in _main
    status = self.run(options, args)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\commands\uninstall.py", line 97, in run
    uninstall_pathset.commit()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\req\req_uninstall.py", line 436, in commit
    self._moved_paths.commit()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\req\req_uninstall.py", line 287, in commit
    save_dir.cleanup()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\utils\temp_dir.py", line 184, in cleanup
    rmtree(self._path)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 326, in wrapped_f
    return self(f, *args, **kw)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 406, in __call__
    do = self.iter(retry_state=retry_state)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 362, in iter
    raise retry_exc.reraise()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 195, in reraise
    raise self.last_attempt.result()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\concurrent\futures\_base.py", line 438, in result
    return self.__get_result()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\concurrent\futures\_base.py", line 390, in __get_result
    raise self._exception
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\tenacity\__init__.py", line 409, in __call__
    result = fn(*args, **kwargs)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\utils\misc.py", line 135, in rmtree
    shutil.rmtree(dir, ignore_errors=ignore_errors, onerror=rmtree_errorhandler)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 739, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 617, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 615, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Liu.D.H\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\~yzmq.libs\\libsodium-138090d4.dll'

C:\Users\Liu.D.H>python
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import zmq
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'zmq'
>>> exit()

C:\Users\Liu.D.H>
C:\Users\Liu.D.H>pip install pyzmq==19.0.2 --user
Collecting pyzmq==19.0.2
  Downloading pyzmq-19.0.2.tar.gz (1.2 MB)
     |████████████████████████████████| 1.2 MB 504 kB/s
Using legacy 'setup.py install' for pyzmq, since package 'wheel' is not installed.
Installing collected packages: pyzmq
    Running setup.py install for pyzmq ... done
Successfully installed pyzmq-19.0.2
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the 'C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip' command.

C:\Users\Liu.D.H>
C:\Users\Liu.D.H>python
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import zmq
>>> zmq.__version__
'19.0.2'
>>> exit()

C:\Users\Liu.D.H>

@liudonghua123
Copy link
Author

@rchiodo Thank you very much! 😄

@DonJayamanne
Copy link
Contributor

@liudonghua123
As a general rule you should try to avoid installing pyzmq and other such packages related to jupyter in user site packages using pip install xxx --user (this is because ipykernel must be installed into each environment, and pyzmq is pulled as a dependency of ipykernel)

This will cause other issues if you try to use another Python environment (such as a virtual environment with a different version or when you mix and match Anaconda with other distros).

@liudonghua123
Copy link
Author

@DonJayamanne Thanks for the tips :😊

@anuoluwatuyi
Copy link

I think this error happens when you install python through the windows app store. I installed mine through the windows app store and faced the same issues.
So I uninstalled the pyzmq package and installed the 19.0.2 version and ignored the compatibility error.
Everything works fine now!
Screenshot (87)

@liudonghua123
Copy link
Author

I think this error happens when you install python through the windows app store. I installed mine through the windows app store and faced the same issues.
So I uninstalled the pyzmq package and installed the 19.0.2 version and ignored the compatibility error.
Everything works fine now!
Screenshot (87)

I think this error is unrelated to ms store python, reinstall pyzmq=19.0.20 should fix enough.

@anuoluwatuyi
Copy link

Interestingly I had to use this fix every single time I launched the notebook. And this was very annoying.

So what did I do?

  1. I uninstalled the ms store python app.
  2. Downloaded python from the python.org site
  3. Installed the python .exe file and added it to PATH during installation
  4. Installed the jupyter notebook again
  5. Added the jupyter notebook to PATH as well

and everything good.
Launched the jupyter notebook and no more bad file descriptor error

@ben-dyer
Copy link

Also had this problem, using 3.10.5 installed via Windows installer. I installed 3.9.13 instead (also via Windows installer), and it is working fine.

@xiezhipeng-git
Copy link

xiezhipeng-git commented Apr 27, 2023

Why not solve this problem from the source? Should we urge vscode jupyter or pyzmq to solve this problem?It's already March 28th, 2022, and this problem still exists.

@minrk
Copy link

minrk commented Apr 27, 2023

Can any Windows folks try this possible fix?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

8 participants
@minrk @DonJayamanne @liudonghua123 @xiezhipeng-git @rchiodo @anuoluwatuyi @ben-dyer and others