microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.26k stars 276 forks source link

Unable to start python interactive window #9420

Closed daigangfan closed 2 years ago

daigangfan commented 2 years ago

Issue Type: Bug

Run command Jupyter:Create Interactive Window Expected Result: connect to local jupyter server and show interactive Window Actual Result: Failed to start the Kernel. Invalid response: 200 OK. View Jupyter log for further details. Jupyter Log: nfo 13:13:24: Creating controller for interactive with interpreter /opt/anaconda3/bin/python Info 13:13:24: Starting interactive window with controller ID ms-toolsai.jupyter/.jvsc74a57bd040d3a090f54c6569ab1632332b64b2c03c39dcf918b08424e98f38b5ae0af88f./opt/anaconda3/python./opt/anaconda3/python.-m#ipykernel_launcher (Interactive) Info 13:13:24: Setting setActiveController for vscode-interactive:Interactive-1.interactive Info 13:13:24: Creating controller for interactive with interpreter /opt/anaconda3/bin/python Info 13:13:24: TargetController found ID: .jvsc74a57bd040d3a090f54c6569ab1632332b64b2c03c39dcf918b08424e98f38b5ae0af88f./opt/anaconda3/python./opt/anaconda3/python.-m#ipykernel_launcher (Interactive) for document vscode-interactive:Interactive-1.interactive Info 13:13:24: Setting controller affinity for vscode-interactive:Interactive-1.interactive .jvsc74a57bd040d3a090f54c6569ab1632332b64b2c03c39dcf918b08424e98f38b5ae0af88f./opt/anaconda3/python./opt/anaconda3/python.-m#ipykernel_launcher (Interactive) Info 13:13:24: Starting Notebook in kernel.ts id = .jvsc74a57bd040d3a090f54c6569ab1632332b64b2c03c39dcf918b08424e98f38b5ae0af88f./opt/anaconda3/python./opt/anaconda3/python.-m#ipykernel_launcher Info 13:13:24: installMissingDependencies /opt/anaconda3/bin/python Info 13:13:24: Process Execution: > /opt/anaconda3/bin/python -c "import ipykernel"

/opt/anaconda3/bin/python -c "import ipykernel" Info 13:13:24: Spec argv[0] updated from '/opt/anaconda3/bin/python' to '/opt/anaconda3/bin/python' Info 13:13:24: Adding env Variable PYTHONNOUSERSITE to /opt/anaconda3/bin/python Info 13:13:24: Starting a new session for kernel id = .jvsc74a57bd040d3a090f54c6569ab1632332b64b2c03c39dcf918b08424e98f38b5ae0af88f./opt/anaconda3/python./opt/anaconda3/python.-m#ipykernel_launcher, name = python397jvsc74a57bd040d3a090f54c6569ab1632332b64b2c03c39dcf918b08424e98f38b5ae0af88f Error 13:13:24: Failed to change kernel, re-throwing [w [Error]: at new o (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:82421) at new w (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:262777) at /home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:616666 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5)

Error: Invalid response: 200 OK at Function.create (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:53508) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Object.a.startSession (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:65530) at async l.startNew (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:61714)] { category: 'unknown', originalException: [a [Error]: Invalid response: 200 OK at Function.create (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:53508) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Object.a.startSession (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:65530) at async l.startNew (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:61714)] { response: F [Response] { size: 0, timeout: 0,

  [Symbol(Response internals)]: [Object]
},
traceback: ''

} } Error 13:13:24: failed to create INotebook in kernel, UI Disabled = false [w [Error]: at new o (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:82421) at new w (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:262777) at /home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:616666 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5)

Error: Invalid response: 200 OK at Function.create (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:53508) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Object.a.startSession (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:65530) at async l.startNew (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:61714)] { category: 'unknown', originalException: [a [Error]: Invalid response: 200 OK at Function.create (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:53508) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Object.a.startSession (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:65530) at async l.startNew (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:61714)] { response: F [Response] { size: 0, timeout: 0,

  [Symbol(Response internals)]: [Object]
},
traceback: ''

} } Warn 13:13:24: Kernel Error [w [Error]: at new o (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:82421) at new w (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:262777) at /home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:616666 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5)

Error: Invalid response: 200 OK at Function.create (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:53508) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Object.a.startSession (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:65530) at async l.startNew (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:61714)] { category: 'unknown', originalException: [a [Error]: Invalid response: 200 OK at Function.create (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:53508) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Object.a.startSession (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:65530) at async l.startNew (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:61714)] { response: F [Response] { size: 0, timeout: 0,

  [Symbol(Response internals)]: [Object]
},
traceback: ''

} } Error 13:13:24: failed to start INotebook in kernel, UI Disabled = false [w [Error]: at new o (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:82421) at new w (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:262777) at /home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/extension.js:2:616666 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5)

Error: Invalid response: 200 OK at Function.create (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:53508) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Object.a.startSession (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:65530) at async l.startNew (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:61714)] { category: 'unknown', originalException: [a [Error]: Invalid response: 200 OK at Function.create (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:53508) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Object.a.startSession (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:65530) at async l.startNew (/home/daigangfan/.vscode/extensions/ms-toolsai.jupyter-2022.2.1030672458/out/client/node_modules/@jupyterlab/services.js:1:61714)] { response: F [Response] { size: 0, timeout: 0,

  [Symbol(Response internals)]: [Object]
},
traceback: ''

} }

VS Code version: Code 1.65.2 (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1, 2022-03-10T15:36:26.048Z) OS version: Linux x64 3.10.0-1160.el7.x86_64 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Xeon(R) Gold 6334 CPU @ 3.60GHz (32 x 800)| |GPU Status|2d_canvas: unavailable_software
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: disabled_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software| |Load (avg)|2, 3, 3| |Memory (System)|503.20GB (8.27GB free)| |Process Argv|--crash-reporter-id 8fccd038-1e4b-4535-9849-c75f07e72c11| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|undefined| |XDG_CURRENT_DESKTOP|undefined| |XDG_SESSION_DESKTOP|undefined| |XDG_SESSION_TYPE|undefined|
Extensions (33) Extension|Author (truncated)|Version ---|---|--- replacerules|bhu|0.4.1 path-intellisense|chr|2.8.0 vscode-hexo|cod|1.0.1 doxdocgen|csc|1.4.0 githistory|don|0.6.19 gitlens|eam|12.0.3 gitkraken-authentication|git|1.0.3 gc-excelviewer|Gra|4.2.53 language-cython|guy|0.0.7 better-cpp-syntax|jef|1.15.13 language-julia|jul|1.5.11 rainbow-csv|mec|2.0.0 vscode-language-pack-zh-hans|MS-|1.65.2 python|ms-|2022.2.1924087327 vscode-pylance|ms-|2022.3.1 jupyter|ms-|2022.2.1030672458 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.6 remote-containers|ms-|0.224.2 remote-ssh|ms-|0.76.1 remote-ssh-edit|ms-|0.76.1 remote-wsl|ms-|0.64.2 cmake-tools|ms-|1.9.2 cpptools|ms-|1.8.4 cpptools-extension-pack|ms-|1.1.0 indent-rainbow|ode|8.2.2 vscode-ipython|pan|0.5.0 open-html-in-browser|pea|2.1.9 material-icon-theme|PKi|4.14.1 vscode-commons|red|0.0.6 vscode-yaml|red|1.5.1 cmake|twx|0.0.17 vscode-icons|vsc|11.10.0 (2 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 pythonvspyl392:30443607 pythontb:30283811 pythonptprofiler:30281270 vsdfh931cf:30280410 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 vscod805cf:30301675 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 vsclayoutctrt:30451275 dsvsc009:30440023 pythonvspyt640:30450904 vscscmwlcmc:30438804 pynewfile477:30450038 ```
IanMatthewHuff commented 2 years ago

@daigangfan Sorry for the issue. Hopefully I can help debug here. Question, is this just a local kernel / python interpreter that you are trying to launch the interactive window with? One of the few times that I've seen errors like this is trying to connect or launch a Jupyter service with incorrect credentials or some extra authorization needed (like an AWS sagemaker instance).

daigangfan commented 2 years ago

Thanks for your reply! I only tried local kernel and python interpreter. It doesn't require any additional authorization because I can directly launch the jupyter notebook from terminal.

greazer commented 2 years ago

Hey @daigangfan, closing this for now. If it still repro's for you please reopen. Another log would probably be helpful too.