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

Error connecting to a Mathematica Notebook #4041

Closed
lyyc199586 opened this issue Nov 30, 2020 · 3 comments
Closed

Error connecting to a Mathematica Notebook #4041

lyyc199586 opened this issue Nov 30, 2020 · 3 comments
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel)

Comments

@lyyc199586
Copy link

Environment data

  • VS Code version: version 1.51
  • Jupyter Extension version: v2020.11.372831992
  • Python Extension version: v2020.12.387755272-dev
  • OS (Windows | Mac | Linux distro) and version: Ubuntu 20.04.1 LTS
  • Python and/or Anaconda version: 3.8.5
  • Type of virtual environment used: N/A
  • Jupyter server running: Local

Expected behaviour

Connecting to a Mathematica notebook

Actual behaviour

Error: 'Timed out waiting to get a heartbeat from kernel process.'

Steps to reproduce:

  1. Install Wolfram Engine and WolframLanguageForJupyter

  2. Successfully run Mathematica notebook in Jupyter (not in VS Code)

  3. Try to run Mathematica notebook in Jupyter (within VS Code)

Logs

Output for Jupyter in the Output panel

Error 2020-11-30 11:14:31: Timed out waiting to get a heartbeat from kernel process.
Error 2020-11-30 11:14:31: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process.
Error 2020-11-30 11:14:31: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process.

@lyyc199586 lyyc199586 added the bug Issue identified by VS Code Team member as probable bug label Nov 30, 2020
@DavidKutu
Copy link

Thanks for reporting the issue @lyyc199586,

Please set the setting jupyter.logging.level to debug in vscode, repro de issue, and share everything from the output panel. That'll help a lot in finding the issue.

Also, I did try to install Wolfram Engine, but I can't get an ID because they think my email isn't real. Did that happen to you by any chance?

@DavidKutu DavidKutu added the info-needed Issue requires more information from poster label Dec 2, 2020
@lyyc199586
Copy link
Author

Thanks for reporting the issue @lyyc199586,

Please set the setting jupyter.logging.level to debug in vscode, repro de issue, and share everything from the output panel. That'll help a lot in finding the issue.

Also, I did try to install Wolfram Engine, but I can't get an ID because they think my email isn't real. Did that happen to you by any chance?

Thanks for your reply! I reproduce the issue with jupyter.logging.level setting to debug.

usr/bin/python3 ~/.vscode-server/extensions/ms-toolsai.jupyter-2020.12.411183155/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2020-12-10 11:14:29: Python Daemon (pid: 1114): Execute rpc method prewarm_kernel in DS Daemon
Info 2020-12-10 11:14:29: Python Daemon (pid: 1114): Execute rpc method prewarm_kernel from /bin/python3
Info 2020-12-10 11:14:29: Python Daemon (pid: 1114): Pre-Warm DS Kernel in DS Kernel Launcher Daemon
Info 2020-12-10 11:14:29: Python Daemon (pid: 1114): Exec in DS Kernel Launcher Daemon (observable) ['/bin/python3', '/home/yang/.vscode-server/extensions/ms-toolsai.jupyter-2020.12.411183155/pythonFiles/vscode_datascience_helpers/../pyvsc-run-isolated.py', '/home/yang/.vscode-server/extensions/ms-toolsai.jupyter-2020.12.411183155/pythonFiles/vscode_datascience_helpers/kernel_prewarm_starter.py']
Info 2020-12-10 11:14:29: Python Daemon (pid: 1114): Exec in DS Kernel Launcher Daemon (observable)
Info 2020-12-10 11:14:29: Python Daemon (pid: 1114): Kernel launched, with PID 1129
Warn 2020-12-10 11:14:29: Python Daemon (pid: 1114): Waiting for Kernel to die 1129
Info 2020-12-10 11:14:29: Python Daemon (pid: 1114): Kernel launched, with PID as a daemon 1129
Info 2020-12-10 11:14:31: Web view react rendered
Info 2020-12-10 11:14:31: Request for onigasm file at /home/yang/.vscode-server/extensions/ms-toolsai.jupyter-2020.12.411183155/out/client/node_modules/onigasm/lib/onigasm.wasm
Info 2020-12-10 11:14:31: Request for tmlanguage file.
Error 2020-12-10 11:14:59: Timed out waiting to get a heartbeat from kernel process.
Error 2020-12-10 11:14:59: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process.
Info 2020-12-10 11:14:59: Shutdown session -- complete
Error 2020-12-10 11:14:59: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (/home/yang/.vscode-server/extensions/ms-toolsai.jupyter-2020.12.411183155/out/client/extension.js:49:637218)]
Error 2020-12-10 11:14:59: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (/home/yang/.vscode-server/extensions/ms-toolsai.jupyter-2020.12.411183155/out/client/extension.js:49:637218)]
Error 2020-12-10 11:14:59: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (/home/yang/.vscode-server/extensions/ms-toolsai.jupyter-2020.12.411183155/out/client/extension.js:49:637218)]
Error 2020-12-10 11:14:59: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (/home/yang/.vscode-server/extensions/ms-toolsai.jupyter-2020.12.411183155/out/client/extension.js:49:637218)]
Error 2020-12-10 11:14:59: Failed to initialize ipywidgetHandler [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (/home/yang/.vscode-server/extensions/ms-toolsai.jupyter-2020.12.411183155/out/client/extension.js:49:637218)]
Info 2020-12-10 11:14:59: KernelProcess error: terminate called after throwing an instance of 'zmq::error_t'
  what():  Interrupted system call

Warn 2020-12-10 11:14:59: StdErr from Kernel Process terminate called after throwing an instance of 'zmq::error_t'
  what():  Interrupted system call

Info 2020-12-10 11:14:59: KernelProcess Exit Exit - null

However, I can open jupyternotebook from VS Code terminal and run Mathematica in it. Also, I used my outlook email to register a Wolfram ID.

Thanks again.

@DavidKutu
Copy link

Thanks for sharing your logs. What I'm thinking is that Wolfram uses zmq, and since we do too, that might be the issue.

Could you please share your environment by running pip list (or conda list if you're using conda) and post it here?

And there's another thing that I'd like to ask you to try:

  1. Set up your Wolfram environment using jupyter notebook
  2. Copy the URL it gives you: http://127.0.0.1:8888/?token=<token>
  3. On VS Code press ctrl + shift + p for the command palette and look for Jupyter: Specify local or remote Jupyter server for connections
  4. Click Existing
  5. Paste the URL
  6. Try running cells

Please let me know if that works.

@DonJayamanne DonJayamanne added the notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) label Jan 4, 2021
@rchiodo rchiodo closed this as completed Feb 18, 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 info-needed Issue requires more information from poster notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel)
Projects
None yet
Development

No branches or pull requests

4 participants