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

2021.4.678042391 throws TypeError: s.notebook.onDidChangeCellExecutionState is not a function #5251

Closed
hkennyv opened this issue Mar 23, 2021 · 2 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@hkennyv
Copy link

hkennyv commented Mar 23, 2021

Environment data

  • VS Code version: 1.55.0-insider (Universal)
  • Jupyter Extension version (available under the Extensions sidebar): 2021.4.678042391
  • Python Extension version (available under the Extensions sidebar): 2021.4.647206359-dev
  • OS (Windows | Mac | Linux distro) and version: MacBook Air (M1, 2020) 11.0.1 (20B29)
  • Python and/or Anaconda version: Python 3.9.1
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv
  • Jupyter server running: Local | Remote | N/A

Expected behaviour

Running cell in python script using # %% cell separator syntax opens interactive window and runs the cell. My current workaround is to install an older version of the jupyter extension (tested with 2021.4.641214696):

Actual behaviour

This behavior seems to only be present on the latest version (at time of writing) 2021.4.678042391 and reverting to an older version (tested with 2021.4.641214696) seems to fix it for now.

  • Shift + Enter on cell
  • "Starting Jupyter server" notification pops up as well as interactive window
  • There is no output in the interactive main window and no kernel is connected
  • Output of jupyter extension:
Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'pythonDiscoveryModule'
User belongs to experiment group 'pythonFindInterpreter'
User belongs to experiment group 'NativeNotebookEditor'
Error 2021-03-23 10:34:39: Exception while attempting zmq : Error: No native build was found for platform=darwin arch=arm64 runtime=electron abi=85 uv=1 armv=8 libc=glibc
    at Function.load.path (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/node_modules/node-gyp-build/index.js:56:9)
    at load (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/node_modules/node-gyp-build/index.js:21:30)
    at Object.<anonymous> (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/node_modules/zeromq/lib/native.js:6:43)
    at Module.u._compile (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:1248)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1039:32)
    at Module._load (internal/modules/cjs/loader.js:932:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
    at Function.s._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:105:27976)
    at Function.w._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:105:24694)
    at Function.c._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:95:58907)
    at Module.require (internal/modules/cjs/loader.js:1079:19)
    at v (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:694)
    at Object.<anonymous> (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/node_modules/zeromq/lib/index.js:3:16)
    at Module.u._compile (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:1248)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1039:32)
    at Module._load (internal/modules/cjs/loader.js:932:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
    at Function.s._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:105:27976)
    at Function.w._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:105:24694)
    at Function.c._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:95:58907)
    at Module.require (internal/modules/cjs/loader.js:1079:19)
    at v (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:694)
    at Object.<anonymous> (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:32:291099)
    at n (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:1:186)
    at d.zmqSupported (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:823550)
    at d.isSupportedForLocalLaunch (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:823200)
    at d.supported (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:823110)
    at Object.t.registerTypes (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:737085)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:271414
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:32:736197
    at t.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:32:735887)
    at async Promise.all (index 0)
Error 2021-03-23 10:34:39: Failure during activation. TypeError: s.notebook.onDidChangeCellExecutionState is not a function
    at p.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:385334)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288818
    at Array.map (<anonymous>)
    at f.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288809)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error 2021-03-23 10:34:39: sendStartupTelemetry() failed. TypeError: s.notebook.onDidChangeCellExecutionState is not a function
    at p.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:385334)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288818
    at Array.map (<anonymous>)
    at f.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288809)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error 2021-03-23 10:34:39: extension activation failed TypeError: s.notebook.onDidChangeCellExecutionState is not a function
    at p.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:385334)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288818
    at Array.map (<anonymous>)
    at f.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288809)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error 2021-03-23 10:34:39: Failed to active the Jupyter Extension TypeError: s.notebook.onDidChangeCellExecutionState is not a function
    at p.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:385334)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288818
    at Array.map (<anonymous>)
    at f.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288809)
    at processTicksAndRejections (internal/process/task_queues.js:97:5

Steps to reproduce:

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

  1. virtualenv venv
  2. source venv/bin/activate
  3. pip install ipykernel
  4. add main.py to current working directory
# %%
print("Hello world")

# %%
  1. Run first cell in main.py
  2. Result is jupyter extension is stuck in "Staring jupyter server" and eventually gives another notification alerting that it could not be started

image

NOTE: If i install an older version of the jupyter extension (tested with 2021.4.641214696) and repeat the above, it will work.

Logs

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

User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'pythonDiscoveryModule'
User belongs to experiment group 'pythonFindInterpreter'
User belongs to experiment group 'NativeNotebookEditor'
Error 2021-03-23 10:34:39: Exception while attempting zmq : Error: No native build was found for platform=darwin arch=arm64 runtime=electron abi=85 uv=1 armv=8 libc=glibc
    at Function.load.path (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/node_modules/node-gyp-build/index.js:56:9)
    at load (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/node_modules/node-gyp-build/index.js:21:30)
    at Object.<anonymous> (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/node_modules/zeromq/lib/native.js:6:43)
    at Module.u._compile (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:1248)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1039:32)
    at Module._load (internal/modules/cjs/loader.js:932:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
    at Function.s._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:105:27976)
    at Function.w._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:105:24694)
    at Function.c._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:95:58907)
    at Module.require (internal/modules/cjs/loader.js:1079:19)
    at v (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:694)
    at Object.<anonymous> (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/node_modules/zeromq/lib/index.js:3:16)
    at Module.u._compile (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:1248)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1039:32)
    at Module._load (internal/modules/cjs/loader.js:932:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
    at Function.s._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:105:27976)
    at Function.w._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:105:24694)
    at Function.c._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:95:58907)
    at Module.require (internal/modules/cjs/loader.js:1079:19)
    at v (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:4:694)
    at Object.<anonymous> (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:32:291099)
    at n (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:1:186)
    at d.zmqSupported (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:823550)
    at d.isSupportedForLocalLaunch (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:823200)
    at d.supported (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:823110)
    at Object.t.registerTypes (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:737085)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:271414
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:32:736197
    at t.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:32:735887)
    at async Promise.all (index 0)
Error 2021-03-23 10:34:39: Failure during activation. TypeError: s.notebook.onDidChangeCellExecutionState is not a function
    at p.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:385334)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288818
    at Array.map (<anonymous>)
    at f.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288809)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error 2021-03-23 10:34:39: sendStartupTelemetry() failed. TypeError: s.notebook.onDidChangeCellExecutionState is not a function
    at p.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:385334)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288818
    at Array.map (<anonymous>)
    at f.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288809)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error 2021-03-23 10:34:39: extension activation failed TypeError: s.notebook.onDidChangeCellExecutionState is not a function
    at p.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:385334)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288818
    at Array.map (<anonymous>)
    at f.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288809)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error 2021-03-23 10:34:39: Failed to active the Jupyter Extension TypeError: s.notebook.onDidChangeCellExecutionState is not a function
    at p.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:49:385334)
    at /Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288818
    at Array.map (<anonymous>)
    at f.activate (/Users/khuynh/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.4.678042391/out/client/extension.js:47:288809)
    at processTicksAndRejections (internal/process/task_queues.js:97:5

@hkennyv hkennyv added the bug Issue identified by VS Code Team member as probable bug label Mar 23, 2021
@joyceerhl
Copy link
Contributor

@hkennyv the latest Jupyter extension build contains changes to be compatible with execution API changes in the latest build of VS Code Insiders. If you upgrade your VS Code Insiders build to the latest, that should resolve the problem:

Version: 1.55.0-insider (user setup)
Commit: a6f6b4aa8e3a688d9a5cbcd5df14af511ce2bd8e
Date: 2021-03-23T05:15:17.057Z (13 hrs ago)

@hkennyv
Copy link
Author

hkennyv commented Mar 23, 2021

@joyceerhl thank you for the speedy answer! that, indeed, solved the issue. i'll close this issue out now

@hkennyv hkennyv closed this as completed Mar 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
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
Projects
None yet
Development

No branches or pull requests

2 participants