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

Can not use Wolfram Kernel when using Local Server #7334

Closed
yfzhao20 opened this issue Aug 29, 2021 · 26 comments
Closed

Can not use Wolfram Kernel when using Local Server #7334

yfzhao20 opened this issue Aug 29, 2021 · 26 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster language-any Area covering general issues geared to supporting any language (not just Python) notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) verified Verification succeeded

Comments

@yfzhao20
Copy link

yfzhao20 commented Aug 29, 2021

This issue is maybe related to #4041. However I want to connect to Wolfram Kernel with LOCAL server.

Environment data

  • VS Code version: 1.59.1(user setup)
  • Jupyter Extension version (available under the Extensions sidebar): v2021.8.1236758218
  • Python Extension version (available under the Extensions sidebar):v2021.8.1159798656
  • OS (Windows | Mac | Linux distro) and version: Windows_NT x64 10.0.19043
  • Python and/or Anaconda version: 3.9.4
  • Jupyter server running: Local

Expected behaviour

Connecting to Wolfram Kernel and doing calculation (just like on remote server):

image

Actual behaviour

Can not connect to Wolfram Server:
image

Steps to reproduce:

  1. install wolfram engine and wolfram language for jupyter, and operate as what he says.
    image
    2.test:
    image
    success.
  2. create a new jupyter notebook (.ipynb) and choose "local" server (Default), then choose Wolfram Language 12.3(Maybe you need restart VSCode)
    image
    image
  3. input $Version then run code.

However there is nothing wrong when I connect to remote server. But I think it is troublesome to connect to remote server every time I use it (As is said in #4041).

Logs

output Info 2021-08-29 22:16:22: Execute Cells request 1 0 Info 2021-08-29 22:16:22: Execute Cell 0 file:///d%3A/1-PRIVATE/P-program/python/new-py-notebook/.ipynb_checkpoints/Wolfram-test-checkpoint-checkpoint.ipynb Info 2021-08-29 22:16:22: Cell Index:0, state:1, exec: undefined. User queued cell for execution Info 2021-08-29 22:16:22: Starting Notebook in kernel.ts id = .wolframlanguage12.3.D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe..d:\0-software\wolfram research\wolfram engine\12.3\wolfram.exe#-script#c:\users\zhaoyifei5053\appdata\roaming\wolframengine\paclets\repository\wolframlanguageforjupyter-0.9.2\resources\kernelforwolframlanguageforjupyter.wl#{connection_file} Info 2021-08-29 22:16:22: Creating raw notebook for file:///d%3A/1-PRIVATE/P-program/python/new-py-notebook/.ipynb_checkpoints/Wolfram-test-checkpoint-checkpoint.ipynb Info 2021-08-29 22:16:22: Getting preferred kernel for file:///d%3A/1-PRIVATE/P-program/python/new-py-notebook/.ipynb_checkpoints/Wolfram-test-checkpoint-checkpoint.ipynb Info 2021-08-29 22:16:22: Computing working directory file:///d%3A/1-PRIVATE/P-program/python/new-py-notebook/.ipynb_checkpoints/Wolfram-test-checkpoint-checkpoint.ipynb Info 2021-08-29 22:16:22: Connecting to raw session for file:///d%3A/1-PRIVATE/P-program/python/new-py-notebook/.ipynb_checkpoints/Wolfram-test-checkpoint-checkpoint.ipynb with connection {"kind":"startUsingKernelSpec","kernelSpec":{"specFile":"C:\\Users\\zhaoyifei5053\\AppData\\Roaming\\jupyter\\kernels\\wolframlanguage12.3\\kernel.json","name":"wolframlanguage12.3","argv":["D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","-script","C:\\Users\\zhaoyifei5053\\AppData\\Roaming\\WolframEngine\\Paclets\\Repository\\WolframLanguageForJupyter-0.9.2\\Resources\\KernelForWolframLanguageForJupyter.wl","{connection_file}"],"language":"Wolfram Language","path":"D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","display_name":"Wolfram Language 12.3"},"id":".wolframlanguage12.3.D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe..d:\\0-software\\wolfram research\\wolfram engine\\12.3\\wolfram.exe#-script#c:\\users\\zhaoyifei5053\\appdata\\roaming\\wolframengine\\paclets\\repository\\wolframlanguageforjupyter-0.9.2\\resources\\kernelforwolframlanguageforjupyter.wl#{connection_file}"} Info 2021-08-29 22:16:22: Starting raw kernel Wolfram Language 12.3 Info 2021-08-29 22:16:22: Kernel launching with ports 9016,9017,9018,9019,9020. Start port is 9000 Info 2021-08-29 22:16:22: Launching Raw Kernel & not daemon Wolfram Language 12.3 # D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe Info 2021-08-29 22:16:22: Cached data exists getEnvironmentVariables, d:\1-PRIVATE\P-program\python\new-py-notebook\.ipynb_checkpoints\Wolfram-test-checkpoint-checkpoint.ipynb Info 2021-08-29 22:16:22: No custom variables for Kernel as interpreter path is not defined for kernel Wolfram Language 12.3 Info 2021-08-29 22:16:22: Process Execution: > D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe -script ~\AppData\Roaming\WolframEngine\Paclets\Repository\WolframLanguageForJupyter-0.9.2\Resources\KernelForWolframLanguageForJupyter.wl C:\Users\ZHAOYI~1\AppData\Local\Temp\tmp-52723FjnkllTcoK8.json > D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe -script ~\AppData\Roaming\WolframEngine\Paclets\Repository\WolframLanguageForJupyter-0.9.2\Resources\KernelForWolframLanguageForJupyter.wl C:\Users\ZHAOYI~1\AppData\Local\Temp\tmp-52723FjnkllTcoK8.json Info 2021-08-29 22:16:22: Process Execution: cwd: d:\1-PRIVATE\P-program\python\new-py-notebook\.ipynb_checkpoints cwd: d:\1-PRIVATE\P-program\python\new-py-notebook\.ipynb_checkpoints Info 2021-08-29 22:16:22: Launching kernel in kernelProcess.ts, Class name = b, completed in 4ms, has a truthy return value, Arg 1: "d:\\1-PRIVATE\\P-program\\python\\new-py-notebook\\.ipynb_checkpoints", Return Value: {"proc":{"_events":{},"_eventsCount":0,"_closesNeeded":3,"_closesGot":0,"connected":false,"signalCode":null,"exitCode":null,"killed":false,"spawnfile":"D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","_handle":{"pid":13892},"spawnargs":["D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","-script","C:\\Users\\zhaoyifei5053\\AppData\\Roaming\\WolframEngine\\Paclets\\Repository\\WolframLanguageForJupyter-0.9.2\\Resources\\KernelForWolframLanguageForJupyter.wl","C:\\Users\\ZHAOYI~1\\AppData\\Local\\Temp\\tmp-52723FjnkllTcoK8.json"],"pid":13892,"stdin":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null,"readable":false},"_events":{},"_eventsCount":1,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stdout":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stderr":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stdio":[{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null,"readable":false},"_events":{},"_eventsCount":1,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null}]},"out":{"_isScalar":false}} Error 2021-08-29 22:17:22: Disposing kernel process due to an error [Error: timeout at Timeout. (c:\Users\zhaoyifei5053\.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:52:778412) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7)] Info 2021-08-29 22:17:22: Dispose Kernel process Error 2021-08-29 22:17:22: Timed out waiting to get a heartbeat from kernel process. Error 2021-08-29 22:17:22: Raw session failed to start in given timeout Info 2021-08-29 22:17:22: Shutdown session -- complete Error 2021-08-29 22:17:22: failed to create INotebook in kernel, UI Disabled = false [_ [Error]: at new o (c:\Users\zhaoyifei5053\.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:16:23818) at new _ (c:\Users\zhaoyifei5053\.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:37:549497) at w.connect (c:\Users\zhaoyifei5053\.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:37:551353) at async E.createNotebookInstance (c:\Users\zhaoyifei5053\.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:90:454182)

Error: 等待内核进程响应超时。
jupyter.viewOutput
查看 Jupyter 日志了解更多细节。
at b.launch (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:52:773225)] {
category: 'timeout',
originalException: [i [Error]: 等待内核进程响应超时。
jupyter.viewOutput
查看 Jupyter 日志了解更多细节。
at b.launch (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:52:773225)] {
category: 'timeout'
}
}
Error 2021-08-29 22:17:22: DataScience Error [i [Error]: 等待内核进程响应超时。
jupyter.viewOutput
查看 Jupyter 日志了解更多细节。
at b.launch (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:52:773225)] {
category: 'timeout'
}
Error 2021-08-29 22:17:22: failed to start INotebook in kernel, UI Disabled = false [_ [Error]:
at new o (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:16:23818)
at new _ (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:37:549497)
at w.connect (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:37:551353)
at async E.createNotebookInstance (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:90:454182)

Error: 等待内核进程响应超时。
jupyter.viewOutput
查看 Jupyter 日志了解更多细节。
at b.launch (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:52:773225)] {
category: 'timeout',
originalException: [i [Error]: 等待内核进程响应超时。
jupyter.viewOutput
查看 Jupyter 日志了解更多细节。
at b.launch (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:52:773225)] {
category: 'timeout'
}
}
Error 2021-08-29 22:17:22: Failed to execute cells in CellExecutionQueue [_ [Error]:
at new o (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:16:23818)
at new _ (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:37:549497)
at w.connect (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:37:551353)
at async E.createNotebookInstance (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:90:454182)

Error: 等待内核进程响应超时。
jupyter.viewOutput
查看 Jupyter 日志了解更多细节。
at b.launch (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:52:773225)] {
category: 'timeout',
originalException: [i [Error]: 等待内核进程响应超时。
jupyter.viewOutput
查看 Jupyter 日志了解更多细节。
at b.launch (c:\Users\zhaoyifei5053.vscode\extensions\ms-toolsai.jupyter-2021.8.1236758218\out\client\extension.js:52:773225)] {
category: 'timeout'
}
}
Info 2021-08-29 22:17:22: Cancel pending cells
Info 2021-08-29 22:17:22: Cell Index:0, state:2, exec: undefined. Execution cancelled
Info 2021-08-29 22:17:22: Cell Index:0, state:2, exec: undefined. Completed due to cancellation
Info 2021-08-29 22:17:22: Cell Index:0, state:2, exec: undefined. Cell cancelled & resolving
Info 2021-08-29 22:17:22: Cell Index:0, state:2, exec: undefined. Execution disposed
Info 2021-08-29 22:17:22: KernelProcess Exit Exit - undefined

Thanks!!

@yfzhao20 yfzhao20 added the bug Issue identified by VS Code Team member as probable bug label Aug 29, 2021
@yfzhao20 yfzhao20 changed the title Can not start Wolfram Kernel when using Local Server Can not use Wolfram Kernel when using Local Server Aug 29, 2021
@DavidKutu
Copy link

Hi @yfzhao20, it looks like your kernel didn't start.

Could you please run this on any terminal outside of VS Code?
D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe -script ~\AppData\Roaming\WolframEngine\Paclets\Repository\WolframLanguageForJupyter-0.9.2\Resources\KernelForWolframLanguageForJupyter.wl C:\Users\ZHAOYI~1\AppData\Local\Temp\tmp-52723FjnkllTcoK8.json

This should start your kernel. Please let me know if that works for you. If it does, there might be something to change in the extension. If it doesn't work, your Wolfram kernel has some issues, maybe it wasn't installed correctly.

Anyway, please keep me posted.

@DavidKutu DavidKutu added notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) language-any Area covering general issues geared to supporting any language (not just Python) labels Sep 1, 2021
@yfzhao20
Copy link
Author

yfzhao20 commented Sep 2, 2021

I think my kernel can be started normally from Jupyter...But finally it is closed for some reason:
(See Taskbar icon. 3 times speed, Ignore cursor movement.)

test.mp4

For that terminal command:

"D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe" -script "%userprofile%\AppData\Roaming\WolframEngine\Paclets\Repository\WolframLanguageForJupyter-0.9.2\Resources\KernelForWolframLanguageForJupyter.wl" "C:\Users\ZHAOYI~1\AppData\Local\Temp\tmp-52723FjnkllTcoK8.json"

It tells me that "C:\Users\ZHAOYI~1\AppData\Local\Temp\tmp-52723FjnkllTcoK8.json" doesn't exist. It does not exist.

output
Get::noopen: Cannot open ~\AppData\Roaming\WolframEngine\Paclets\Repository\WolframLanguageForJupyter-0.9.2\Resources\KernelForWolframLanguageForJupyter.wl.

C:\Users\zhaoyifei5053>"D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe" -script "%userprofile%\AppData\Roaming\WolframEngine\Paclets\Repository\WolframLanguageForJupyter-0.9.2\Resources\KernelForWolframLanguageForJupyter.wl" "C:\Users\ZHAOYI~1\AppData\Local\Temp\tmp-52723FjnkllTcoK8.json"

Import::nffil: File C:\Users\ZHAOYI~1\AppData\Local\Temp\tmp-52723FjnkllTcoK8.json
     not found during Import.

Import::nffil: File C:\Users\ZHAOYI~1\AppData\Local\Temp\tmp-52723FjnkllTcoK8.json
     not found during Import.

StringJoin::string:
   String expected at position 1 in
    Association[ToString[Import[$CommandLine[[4]], JSON]]][transport]<>://<>
     Association[ToString[Import[$CommandLine[[4]], JSON]]][ip]<>:.

StringJoin::string:
   String expected at position 3 in
    Association[ToString[Import[$CommandLine[[4]], JSON]]][transport]<>://<>
     Association[ToString[Import[$CommandLine[[4]], JSON]]][ip]<>:.

StringJoin::string:
   String expected at position 1 in
    Association[ToString[Import[$CommandLine[[4]], JSON]]][transport]<>://<>
     Association[ToString[Import[$CommandLine[[4]], JSON]]][ip]<>:<>
     Association[ToString[Import[$CommandLine[[4]], JSON]]][hb_port].

General::stop: Further output of StringJoin::string
     will be suppressed during this calculation.

Today I had another try and tracked the temp file. It was deleted after the connection failed. I copied the temp file before it disappears. It says:

{
    "key": "bcfe634a-d211-44f9-97ea-48a2c22cd3b8",
    "signature_scheme": "hmac-sha256",
    "transport": "tcp",
    "ip": "127.0.0.1",
    "hb_port": 9029,
    "control_port": 9030,
    "shell_port": 9031,
    "stdin_port": 9032,
    "iopub_port": 9033,
    "kernel_name": "wolframlanguage12.3"
}

So strange...

@DavidKutu
Copy link

Thanks for your response @yfzhao20.
Us deleting the temp file is normal, we do it as to not leave user's PCs with a bunch of files.
The contents of it also look ok, thank you for sharing it.

I have another question, could you share the kernel.json of your Wolfram kernel?

@yfzhao20
Copy link
Author

yfzhao20 commented Sep 3, 2021

Thank you @DavidKutu !
Do you mean this kernel.json ?

{
  "argv":[
  "D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe",
  "-script",
  "C:\\Users\\zhaoyifei5053\\AppData\\Roaming\\WolframEngine\\Paclets\\Repository\\WolframLanguageForJupyter-0.9.2\\Resources\\KernelForWolframLanguageForJupyter.wl",
  "{connection_file}"
  ],
  "display_name":"Wolfram Language 12.3",
  "language":"Wolfram Language"
}

@ted1277
Copy link

ted1277 commented Sep 25, 2021

Hi, I'm in the same situation: Wolfram Kernel can be connected for the remote server, but not for the local server.

@DavidKutu
Copy link

Hi @yfzhao20, I apologize for taking so long to get back to you.

I asked for the kernelspec because I wanted to check if you can start it on your own on a terminal. To do so, please run the following:

<your python path>\python.exe -m ipykernel_launcher -f D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe -script C:\Users\zhaoyifei5053\AppData\Roaming\WolframEngine\Paclets\Repository\WolframLanguageForJupyter-0.9.2\Resources\KernelForWolframLanguageForJupyter.wl

Let me know if that works and please share a screenshot.

@ted1277, you can try the same thing, just find your kernel.json. If you share it I can help you get the command.

@yfzhao20
Copy link
Author

Thanks! Recently I have reinstalled WolframKernelForJupyter , however I found that it always gives me a dialog box after I try to run the code:
image

I don't know how to choose, but I have tested all of Wolfram programs in the dialog box. None of them works (still "Timeout")... Then I tried your method:

image

PS D:\1-PRIVATE\P-program\python> D:\0-SOFTWARE\Python39\python.exe -m ipykernel_launcher -f D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe -script C:\Users\zhaoyifei5053\AppData\Roaming\WolframEngine\Paclets\Repository\WolframLanguageForJupyter-0.9.2\Resources\KernelForWolframLanguageForJupyter.wl
[IPKernelApp] WARNING | Unrecognized alias: 'script', it will have no effect.
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.   

To exit, you will have to explicitly quit this process, by either sending  
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing D:\0-SOFTWARE\Wolfram

This is kernel.json and I think that the file is not changed.

{
	"argv":[
		"D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe",
		"-script",
		"C:\\Users\\zhaoyifei5053\\AppData\\Roaming\\WolframEngine\\Paclets\\Repository\\WolframLanguageForJupyter-0.9.2\\Resources\\KernelForWolframLanguageForJupyter.wl",
		"{connection_file}"
	],
	"display_name":"Wolfram Language 12.3",
	"language":"Wolfram Language"
}

Thank you!😃

@ted1277
Copy link

ted1277 commented Sep 29, 2021

Hi, @DavidKutu, my result is similar to that of @yfzhao20.

I have collected the key information below.

The present situation

  1. I'm using Wolfram Engine and WolframLanguageForJupyter (same as these used by @yfzhao20)
  2. It works well on Jupyter Lab (editor in browser), but when open the .ipynb in VS code, the kernel can not be launched (Jupyter server: local).
  3. If first open Jupyter Lab; next, open the .ipynb in VS code ; then, chose the Jupyter server: remote and select the kernel (input the link provide by Jupyter Lab), it works.

About the json file and starting the kernel on my own

The path of kernel.json is given by the below command, (note that, the path of wolframlanguage12.3 is different with the other two)

(base) C:\Users\74239\data-ted\cache\ada>jupyter kernelspec list
Available kernels:
  wolframlanguage12.3    C:\Users\74239\AppData\Roaming\jupyter\kernels\wolframlanguage12.3
  fortran                C:\Users\74239\miniforge3\share\jupyter\kernels\fortran
  python3                C:\Users\74239\miniforge3\share\jupyter\kernels\python3

and it reads

{
        "argv":[
                "C:\\Program Files\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe",
                "-script",
                "C:\\Users\\74239\\Apps\\WolframLanguageForJupyter-master\\WolframLanguageForJupyter\\Resources\\KernelForWolframLanguageForJupyter.wl",
                "{connection_file}",
                "ScriptInstall"
        ],
        "display_name":"Wolfram Language 12.3",
        "language":"Wolfram Language"
}

so, I run

\python.exe -m ipykernel_launcher -f C:\Program Files\Wolfram Research\Wolfram Engine\12.3\wolfram.exe -script C:\Users\74239\Apps\WolframLanguageForJupyter-master\WolframLanguageForJupyter\Resources\KernelForWolframLanguageForJupyter.wl

I need to run this code as the administrator, or it returns PermissionError: [Errno 13] Permission denied: 'C:\\Program'

(base) C:\Users\74239\data-ted\cache\ada>python.exe -m ipykernel_launcher -f C:\Program Files\Wolfram Research\Wolfram Engine\12.3\wolfram.exe -script C:\Users\74239\Apps\WolframLanguageForJupyter-master\WolframLanguageForJupyter\Resources\KernelForWolframLanguageForJupyter.wl
[IPKernelApp] WARNING | Unrecognized alias: 'script', it will have no effect.
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing C:\Program

The output when failed launcing the kernel

These are copied from the OUTPUT window of VS code.

Info 2021-09-30 01:42:06: Starting raw kernel Wolfram Language 12.3
Info 2021-09-30 01:42:06: Kernel launching with ports 9000,9001,9002,9003,9004. Start port is 9000
Info 2021-09-30 01:42:06: Launching Raw Kernel & not daemon Wolfram Language 12.3 # C:\Program Files\Wolfram Research\Wolfram Engine\12.3\wolfram.exe
Info 2021-09-30 01:42:06: No custom variables for Kernel as interpreter path is not defined for kernel Wolfram Language 12.3
Info 2021-09-30 01:42:06: Process Execution: > C:\Program Files\Wolfram Research\Wolfram Engine\12.3\wolfram.exe -script ~\Apps\WolframLanguageForJupyter-master\WolframLanguageForJupyter\Resources\KernelForWolframLanguageForJupyter.wl ~\AppData\Local\Temp\tmp-8904wb0B14dhpUs1.json ScriptInstall
> C:\Program Files\Wolfram Research\Wolfram Engine\12.3\wolfram.exe -script ~\Apps\WolframLanguageForJupyter-master\WolframLanguageForJupyter\Resources\KernelForWolframLanguageForJupyter.wl ~\AppData\Local\Temp\tmp-8904wb0B14dhpUs1.json ScriptInstall
Info 2021-09-30 01:42:06: Process Execution: cwd: c:\Users\74239\data-ted\cache\ipynbs
cwd: c:\Users\74239\data-ted\cache\ipynbs
Info 2021-09-30 01:42:06: Launching kernel in kernelProcess.ts, Class name = y, completed in 4ms, has a truthy return value, Arg 1: "c:\\Users\\74239\\data-ted\\cache\\ipynbs", Return Value: {"proc":{"_events":{},"_eventsCount":0,"_closesNeeded":3,"_closesGot":0,"connected":false,"signalCode":null,"exitCode":null,"killed":false,"spawnfile":"C:\\Program Files\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","_handle":{"pid":11152},"spawnargs":["C:\\Program Files\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","-script","C:\\Users\\74239\\Apps\\WolframLanguageForJupyter-master\\WolframLanguageForJupyter\\Resources\\KernelForWolframLanguageForJupyter.wl","C:\\Users\\74239\\AppData\\Local\\Temp\\tmp-8904wb0B14dhpUs1.json","ScriptInstall"],"pid":11152,"stdin":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null,"readable":false},"_events":{},"_eventsCount":1,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stdout":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stderr":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stdio":[{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null,"readable":false},"_events":{},"_eventsCount":1,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null}]},"out":{"_isScalar":false}}
Error 2021-09-30 01:43:06: Disposing kernel process due to an error [Error: timeout
	at Timeout.<anonymous> (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:798807)
	at listOnTimeout (internal/timers.js:554:17)
	at processTimers (internal/timers.js:497:7)]
Info 2021-09-30 01:43:06: Dispose Kernel process
Error 2021-09-30 01:43:06: Timed out waiting to get a heartbeat from kernel process.
Error 2021-09-30 01:43:06: Raw session failed to start in given timeout
Info 2021-09-30 01:43:06: Shutdown session -- complete
Error 2021-09-30 01:43:06: failed to create INotebook in kernel, UI Disabled = false [_ [Error]: 
	at new o (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:16:41638)
	at new _ (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:90:319053)
	at w.connect (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:90:320909)
	at async P.createNotebookInstance (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:90:316972)

Error: Timed out waiting to get a heartbeat from kernel process.
jupyter.viewOutput 
See Jupyter [OUTPUT](command:{1})for more details.
	at y.launch (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:791074)] {
  category: 'timeout',
  originalException: [i [Error]: Timed out waiting to get a heartbeat from kernel process.
  jupyter.viewOutput 
  See Jupyter [OUTPUT](command:{1})for more details.
  	at y.launch (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:791074)] {
    category: 'timeout'
  }
}
Error 2021-09-30 01:43:06: DataScience Error [i [Error]: Timed out waiting to get a heartbeat from kernel process.
jupyter.viewOutput 
See Jupyter [OUTPUT](command:{1})for more details.
	at y.launch (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:791074)] {
  category: 'timeout'
}
Error 2021-09-30 01:43:06: failed to start INotebook in kernel, UI Disabled = false [_ [Error]: 
	at new o (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:16:41638)
	at new _ (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:90:319053)
	at w.connect (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:90:320909)
	at async P.createNotebookInstance (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:90:316972)

Error: Timed out waiting to get a heartbeat from kernel process.
jupyter.viewOutput 
See Jupyter [OUTPUT](command:{1})for more details.
	at y.launch (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:791074)] {
  category: 'timeout',
  originalException: [i [Error]: Timed out waiting to get a heartbeat from kernel process.
  jupyter.viewOutput 
  See Jupyter [OUTPUT](command:{1})for more details.
  	at y.launch (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:791074)] {
    category: 'timeout'
  }
}
Error 2021-09-30 01:43:06: Failed to execute cells in CellExecutionQueue [_ [Error]: 
	at new o (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:16:41638)
	at new _ (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:90:319053)
	at w.connect (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:90:320909)
	at async P.createNotebookInstance (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:90:316972)

Error: Timed out waiting to get a heartbeat from kernel process.
jupyter.viewOutput 
See Jupyter [OUTPUT](command:{1})for more details.
	at y.launch (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:791074)] {
  category: 'timeout',
  originalException: [i [Error]: Timed out waiting to get a heartbeat from kernel process.
  jupyter.viewOutput 
  See Jupyter [OUTPUT](command:{1})for more details.
  	at y.launch (c:\Users\74239\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:791074)] {
    category: 'timeout'
  }
}
Info 2021-09-30 01:43:06: Cancel pending cells
Info 2021-09-30 01:43:06: KernelProcess Exit Exit - undefined 

@DavidKutu
Copy link

Hi @yfzhao20 and @ted1277, sorry to get back to you this late.

I'll admit I'm a total noob when it comes to Wolfram, but I'd like to try and get it working on my machine and get back to you with my findings.

In that note, I wanted to ask: could you share what did you install? (like a specific version of the kernel, etc)
And please share some simple code I can try after I get it running.

You both mentioned it works when you run it remotely, that brings me to think there is some parameter the extension is not passing that is specific to Wolfram. So, final question, how do you start the kernel normally? (when you connect to it remotely).

I'd really like to add support for this, so please get back to me when you get the chance.

@ted1277
Copy link

ted1277 commented Oct 4, 2021

Hi @DavidKutu

  1. The version of Wolfram Engine is 12.3
  2. For the sample test code, just type 1+1 and run
  3. Start a remote kernel: first run Jupyter Lab (it will give you the URL of the server), then paste the URL in VS code (chose remote Jupyter server)

To make sure you can repeat this problem on your computer, I have written the installation in detail. All the installation and setups may take you 15 mins.

First, you need to install the Wolfram Engine; it is free, but you need to create a Wolfram ID to get a license. The Wolfram Engine is about 1 GB.

  1. Download Wolfram Engine at https://www.wolfram.com/engine/ (I'm running it on Windows)
  2. Create your Wolfram ID at https://account.wolfram.com/auth/create
  3. Install and activate it on your machine. It is very direct, you can follow the instructions at https://support.wolfram.com/46069

You can type wolframscript.exe in your PowerShell or Command Prompt to open Wolfram Engine and run 1+1 in it, it should return you 2. Type Exit to quit.
Here is the example run on my computer

PS C:\Users\74239\data-ted\cache\ada> wolframscript.exe
Wolfram Language 12.3.1 Engine for Microsoft Windows (64-bit)
Copyright 1988-2021 Wolfram Research, Inc.

In[1]:= 1+1

Out[1]= 2

In[2]:= Integrate[1/x,x]

Out[2]= Log[x]

In[3]:= Exit
PS C:\Users\74239\data-ted\cache\ada>

(I believe you have installed Jupyter Lab, if not, you can directly install conda and run conda install jupyterlab.)

Then, you need the WolframLanguageForJupyter here, I think "Method 1" suits you. It may takes you 2 mins.

  1. Just download all the code at https://github.com/WolframResearch/WolframLanguageForJupyter and unzip it (you can place it at some path you like, you will need it when use the Wolfram engine in Jupyter, don't move it after the installation).
  2. run .\configure-jupyter.wls add at the path you chose. (note that if your Jupyter Lab is installed by conda, remember to run this at the same environment of Jupyter Lab)

Now, you should be able to chose Wolfram Language 12.3 as the kernel in an .ipynb file opened by Jupyter Lab or VS code.
You can run 1+1 again after chose Wolfram Language 12.3 as the kernel. I believe you will see what @yfzhao20 described above.

If you need any more information, let me know.

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Oct 8, 2021

@yfzhao20 I've managed to repro this locally.
Unfortunately I cannot get the kernel startd locally even with Jupyter Notebooks.
This is the error I'm getting

name: wolframlanguage12.3
No valid password found.

However, the same kernel can be started in Jupyter Labs. I.e. there's something different in lab vs notebooks.
& could explain why VS Code isn't able to start this kernel either.

Now that I can repro this and I can get this working in Jupyter Labs, I'm certain we can get this fixed in VS Code as well. Thanks for your patience & the information you provided (helped me set this up locally)

@DonJayamanne
Copy link
Contributor

Some how Jupyter notebooks is working now.
I've managed to identify the issue, bascially we're waiting for the Wolfram kernel to connect to he heart beat kernel, however it seem wolfram kernel never connects to that. Need to check the spec
We'll have a fix for this.

@yfzhao20 In the mean time you might have some luck with the following (unsupported) approach:

  • Add the following into your settings.json file
"jupyter.disableZMQSupport": false
  • With this approach we use jupyter to connect to the kernel & it will work.

We'll try to get this fixed, now that we know what's wrong & what needs to be fixed, it shouldn't take too long.
Thanks for your patiennce

@DonJayamanne
Copy link
Contributor

Internal notes (for fix):

  • Looks like Error connecting to a Mathematica Notebook #4041 was never resolved (I don't see how it would have worked)
    • Unless users ended up in non-raw scenarios
  • We shouldn't wait for heartbeat port to be connected (doesn't work here)
    • We might want to wait for shell or other ports to be connected
    • Based on docs here https://jupyter-client.readthedocs.io/en/stable/messaging.html#heartbeat-for-kernels it should be supported (depends on how you infer the message). however this also depends on the version of the spec adopted by the kernel.
      • Ther'es no way to get the version without really connecting, hence I don't think we should rely on this heavily.
      • Best is to wait for shell port or the like.
    • & then wait on the kernel_info message.
      • In jupyter (lab & notebooks) they wait for kernel_info message to be received first, before supporting other messages (i.e. kernel is usable only after it sends the kernel_info message)
      • We might want to wait on that or take that into considertaion.
  • This could mean there are other kernels that dont work at all with VS Code.

@ted1277
Copy link

ted1277 commented Oct 9, 2021

Hi, @DonJayamanne, thank you for your efforts! We will wait for the fix.
Also, I tried adding "jupyter.disableZMQSupport": false in the settings.json file, but it shows "Unknown Configuration Setting".

@DonJayamanne
Copy link
Contributor

@ted1277
I've added the fix, it should in in tomorrows insider version of the extension.
Please install VS Code Insiders and you'll get the fix (we'll ship this in the next stable version of the extension)

@roblourens
Copy link
Member

@DonJayamanne how did you test this, seems like wolfram is not free, do you have a license key?

@roblourens
Copy link
Member

Oops I see the helpful comment above

@roblourens
Copy link
Member

I can't get it to work. I get Kernel process Exited and failed to create INotebook in kernel

Info 2021-10-27 14:45:15: Setting setActiveController for file:///Users/roblou/code/jupyter-local/test6.ipynb
Silly 2021-10-27 14:45:15: Intiailize notebook communications for editor file:///Users/roblou/code/jupyter-local/test6.ipynb
Silly 2021-10-27 14:45:15: Resolving notebook UI Comms (resolve) for file:///Users/roblou/code/jupyter-local/test6.ipynb
Silly 2021-10-27 14:45:15: initialize CommonMessageCoordinator
Silly 2021-10-27 14:45:15: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-10-27 14:45:15: KernelProvider switched kernel to id = .wolframlanguage12.3./Applications/Wolfram Engine.app/Contents/Resources/Wolfram Player.app/Contents/MacOS/WolframKernel../applications/wolfram engine.app/contents/resources/wolfram player.app/contents/macos/wolframkernel#-script#/private/tmp/wolframlanguageforjupyter/wolframlanguageforjupyter/resources/kernelforwolframlanguageforjupyter.wl#{connection_file}#scriptinstall
Info 2021-10-27 14:45:15: Starting Notebook in kernel.ts id = .wolframlanguage12.3./Applications/Wolfram Engine.app/Contents/Resources/Wolfram Player.app/Contents/MacOS/WolframKernel../applications/wolfram engine.app/contents/resources/wolfram player.app/contents/macos/wolframkernel#-script#/private/tmp/wolframlanguageforjupyter/wolframlanguageforjupyter/resources/kernelforwolframlanguageforjupyter.wl#{connection_file}#scriptinstall
Info 2021-10-27 14:45:15: Creating raw notebook for file:///Users/roblou/code/jupyter-local/test6.ipynb
Info 2021-10-27 14:45:15: Getting preferred kernel for file:///Users/roblou/code/jupyter-local/test6.ipynb
Info 2021-10-27 14:45:15: Computing working directory file:///Users/roblou/code/jupyter-local/test6.ipynb
Silly 2021-10-27 14:45:15: Registering commtarget jupyter.widget
Silly 2021-10-27 14:45:15: IPyWidgetMessageDispatcher.initialize
Silly 2021-10-27 14:45:15: Created and initailized CommonMessageCoordinator
Silly 2021-10-27 14:45:15: Attach Coordinator for file:///Users/roblou/code/jupyter-local/test6.ipynb
Info 2021-10-27 14:45:15: Connecting to raw session for file:///Users/roblou/code/jupyter-local/test6.ipynb with connection {"kind":"startUsingKernelSpec","kernelSpec":{"specFile":"/Users/roblou/Library/Jupyter/kernels/wolframlanguage12.3/kernel.json","name":"wolframlanguage12.3","argv":["/Applications/Wolfram Engine.app/Contents/Resources/Wolfram Player.app/Contents/MacOS/WolframKernel","-script","/private/tmp/WolframLanguageForJupyter/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl","{connection_file}","ScriptInstall"],"language":"Wolfram Language","path":"/Applications/Wolfram Engine.app/Contents/Resources/Wolfram Player.app/Contents/MacOS/WolframKernel","display_name":"Wolfram Language 12.3"},"id":".wolframlanguage12.3./Applications/Wolfram Engine.app/Contents/Resources/Wolfram Player.app/Contents/MacOS/WolframKernel../applications/wolfram engine.app/contents/resources/wolfram player.app/contents/macos/wolframkernel#-script#/private/tmp/wolframlanguageforjupyter/wolframlanguageforjupyter/resources/kernelforwolframlanguageforjupyter.wl#{connection_file}#scriptinstall"}
Info 2021-10-27 14:45:15: Starting raw kernel Wolfram Language 12.3
Info 2021-10-27 14:45:15: Kernel launching with ports 9017,9018,9019,9020,9021. Start port is 9000
Info 2021-10-27 14:45:15: Find preferred kernel for file:///Users/roblou/code/jupyter-local/test6.ipynb with metadata {"interpreter":{"hash":"ade05ffae33c2f0f08bbcb29c69ffa01f73d2408eb5a799f161e5ae1d70682bd"},"kernelspec":{"display_name":"Wolfram Language 12.3","language":"Wolfram Language","name":"wolframlanguage12.3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"Wolfram Language","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.9.5"},"orig_nbformat":4} & preferred interpreter {}
Info 2021-10-27 14:45:15: findPreferredKernel score for .NET (C#) is -1
Info 2021-10-27 14:45:15: findPreferredKernel score for .NET (F#) is -1
Info 2021-10-27 14:45:15: findPreferredKernel score for .NET (PowerShell) is -1
Info 2021-10-27 14:45:15: findPreferredKernel score for Wolfram Language 12.3 is 15
Info 2021-10-27 14:45:15: findPreferredKernel score for Python 2.7.16 64-bit is -1
Info 2021-10-27 14:45:15: findPreferredKernel score for Python 3.8.9 64-bit is -1
Info 2021-10-27 14:45:15: findPreferredKernel score for Python 3.7.10 64-bit ('golden_scenario_env': conda) is -1
Info 2021-10-27 14:45:15: findPreferredKernel score for Python 3.7.10 64-bit ('tf2': conda) is -1
Info 2021-10-27 14:45:15: findPreferredKernel score for Python 3.8.8 64-bit ('base': conda) is -1
Info 2021-10-27 14:45:15: findPreferredKernel score for Python 3.9.5 64-bit is -1
Info 2021-10-27 14:45:15: findPreferredKernel score for Python 3.9.5 64-bit ('myvenv': venv) is 99
Info 2021-10-27 14:45:15: findPreferredKernel score for Python 3.7.0 64-bit is -1
Info 2021-10-27 14:45:15: findKernel found Python 3.9.5 64-bit ('myvenv': venv)
Info 2021-10-27 14:45:15: Find kernel spec, Class name = k, completed in 38ms, has a truthy return value, Arg 1: <Uri:/Users/roblou/code/jupyter-local/test6.ipynb>, Arg 2: {"interpreter":{"hash":"ade05ffae33c2f0f08bbcb29c69ffa01f73d2408eb5a799f161e5ae1d70682bd"},"kernelspec":{"display_name":"Wolfram Language 12.3","language":"Wolfram Language","name":"wolframlanguage12.3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"Wolfram Language","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.9.5"},"orig_nbformat":4}, Arg 3: {"_isCancelled":false,"_emitter":{"_disposed":false,"_listeners":{"_first":{"next":{},"prev":{}},"_last":{"next":{},"prev":{}},"_size":1}}}, Return Value: {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/Users/roblou/Library/Jupyter/kernels/python395jvsc74a57bd0ade05ffae33c2f0f08bbcb29c69ffa01f73d2408eb5a799f161e5ae1d70682bd/kernel.json","interpreterPath":"/Users/roblou/code/jupyter-local/myvenv/bin/python","name":"python395jvsc74a57bd0ade05ffae33c2f0f08bbcb29c69ffa01f73d2408eb5a799f161e5ae1d70682bd","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"python","display_name":"Python 3.9.5 64-bit ('myvenv': venv)","metadata":{"interpreter":{"sysPrefix":"/Users/roblou/code/jupyter-local/myvenv","envType":"Venv","envName":"myvenv","envPath":"/Users/roblou/code/jupyter-local/myvenv","path":"/Users/roblou/code/jupyter-local/myvenv/bin/python","architecture":3,"sysVersion":"3.9.5 (v3.9.5:0a7dcbdb13, May  3 2021, 13:17:02) \n[Clang 6.0 (clang-600.0.57)]","version":{"raw":"3.9.5","major":3,"minor":9,"patch":5,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.9.5 64-bit ('myvenv': venv)"}},"env":{}},"interpreter":{"sysPrefix":"/Users/roblou/code/jupyter-local/myvenv","envType":"Venv","envName":"myvenv","envPath":"/Users/roblou/code/jupyter-local/myvenv","path":"/Users/roblou/code/jupyter-local/myvenv/bin/python","architecture":3,"sysVersion":"3.9.5 (v3.9.5:0a7dcbdb13, May  3 2021, 13:17:02) \n[Clang 6.0 (clang-600.0.57)]","version":{"raw":"3.9.5","major":3,"minor":9,"patch":5,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.9.5 64-bit ('myvenv': venv)"},"id":".jvsc74a57bd0ade05ffae33c2f0f08bbcb29c69ffa01f73d2408eb5a799f161e5ae1d70682bd./Users/roblou/code/jupyter-local/myvenv/python./Users/roblou/code/jupyter-local/myvenv/python.-m#ipykernel_launcher"}
Info 2021-10-27 14:45:15: PreferredConnection: .jvsc74a57bd0ade05ffae33c2f0f08bbcb29c69ffa01f73d2408eb5a799f161e5ae1d70682bd./Users/roblou/code/jupyter-local/myvenv/python./Users/roblou/code/jupyter-local/myvenv/python.-m#ipykernel_launcher found for NotebookDocument: file:///Users/roblou/code/jupyter-local/test6.ipynb
Info 2021-10-27 14:45:15: TargetController found ID: .jvsc74a57bd0ade05ffae33c2f0f08bbcb29c69ffa01f73d2408eb5a799f161e5ae1d70682bd./Users/roblou/code/jupyter-local/myvenv/python./Users/roblou/code/jupyter-local/myvenv/python.-m#ipykernel_launcher for document file:///Users/roblou/code/jupyter-local/test6.ipynb
Info 2021-10-27 14:45:15: Setting controller affinity for file:///Users/roblou/code/jupyter-local/test6.ipynb .jvsc74a57bd0ade05ffae33c2f0f08bbcb29c69ffa01f73d2408eb5a799f161e5ae1d70682bd./Users/roblou/code/jupyter-local/myvenv/python./Users/roblou/code/jupyter-local/myvenv/python.-m#ipykernel_launcher
Info 2021-10-27 14:45:16: Hiding default kernel spec Python 3 (ipykernel), /Users/roblou/opt/anaconda3/envs/golden_scenario_env/bin/python
Info 2021-10-27 14:45:16: Hiding default kernel spec Python 3 (ipykernel), python
Info 2021-10-27 14:45:16: Kernel python388jvsc74a57bd0745d2506056d35e4e8d28eec18bdb364294104d0e64bf8946413e660bf7249d9 matches Python 3.8.8 64-bit ('base': conda) based on path in argv.
Info 2021-10-27 14:45:16: Kernel python3710jvsc74a57bd05d71878c995d9d25c9052086d0d8cf6b550a28f9d07e5037a49d5d1e18320a3f matches Python 3.7.10 64-bit ('tf2': conda) based on path in argv.
Info 2021-10-27 14:45:16: Launching Raw Kernel & not daemon Wolfram Language 12.3 # /Applications/Wolfram Engine.app/Contents/Resources/Wolfram Player.app/Contents/MacOS/WolframKernel
Silly 2021-10-27 14:45:16: Cached data exists getEnvironmentVariables, /Users/roblou/code/jupyter-local/test6.ipynb
Info 2021-10-27 14:45:16: No custom variables for Kernel as interpreter path is not defined for kernel Wolfram Language 12.3
Info 2021-10-27 14:45:16: Process Execution: > /Applications/Wolfram Engine.app/Contents/Resources/Wolfram Player.app/Contents/MacOS/WolframKernel -script /private/tmp/WolframLanguageForJupyter/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl /var/folders/tx/p0ycbfpj37786p760wwdg6y80000gn/T/tmp-35744rlu4s44vn3KT.json ScriptInstall
> /Applications/Wolfram Engine.app/Contents/Resources/Wolfram Player.app/Contents/MacOS/WolframKernel -script /private/tmp/WolframLanguageForJupyter/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl /var/folders/tx/p0ycbfpj37786p760wwdg6y80000gn/T/tmp-35744rlu4s44vn3KT.json ScriptInstall
Info 2021-10-27 14:45:16: Process Execution: cwd: ~/code/jupyter-local
cwd: ~/code/jupyter-local
Info 2021-10-27 14:45:16: Launching kernel in kernelProcess.ts, Class name = y, completed in 2ms, has a truthy return value, Arg 1: "/Users/roblou/code/jupyter-local", Return Value: {"proc":{"_events":{},"_eventsCount":0,"_closesNeeded":3,"_closesGot":0,"connected":false,"signalCode":null,"exitCode":null,"killed":false,"spawnfile":"/Applications/Wolfram Engine.app/Contents/Resources/Wolfram Player.app/Contents/MacOS/WolframKernel","_handle":{"pid":40553},"spawnargs":["/Applications/Wolfram Engine.app/Contents/Resources/Wolfram Player.app/Contents/MacOS/WolframKernel","-script","/private/tmp/WolframLanguageForJupyter/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl","/var/folders/tx/p0ycbfpj37786p760wwdg6y80000gn/T/tmp-35744rlu4s44vn3KT.json","ScriptInstall"],"pid":40553,"stdin":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null,"readable":false},"_events":{},"_eventsCount":1,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stdout":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stderr":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stdio":[{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null,"readable":false},"_events":{},"_eventsCount":1,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null}]},"out":{"_isScalar":false}}
Info 2021-10-27 14:45:16: KernelProcess Exit Exit - 1 
Error 2021-10-27 14:45:16: Disposing kernel process due to an error o [Error]: Kernel process Exited
    at ChildProcess.<anonymous> (/Users/roblou/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.10.1001389388/out/client/extension.js:66:794173)
    at ChildProcess.emit (events.js:327:22)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
  category: 'kerneldied',
  exitCode: 1
}
Info 2021-10-27 14:45:16: Dispose Kernel process
Error 2021-10-27 14:45:16: 
Error 2021-10-27 14:45:16: Failed to connect raw kernel session: Error: The kernel died. View Jupyter [log](command:jupyter.viewOutput) for further details. 
Error: ...
Info 2021-10-27 14:45:16: Shutdown session -- complete
Error 2021-10-27 14:45:16: failed to create INotebook in kernel, UI Disabled = true i [Error]: 
    at new o (/Users/roblou/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.10.1001389388/out/client/extension.js:16:45228)
    at new i (/Users/roblou/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.10.1001389388/out/client/extension.js:16:110639)
    at y.launch (/Users/roblou/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.10.1001389388/out/client/extension.js:66:795747)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Error: Kernel process Exited
    at ChildProcess.<anonymous> (/Users/roblou/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.10.1001389388/out/client/extension.js:66:794173)
    at ChildProcess.emit (events.js:327:22)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
  category: 'kerneldied',
  originalException: o [Error]: Kernel process Exited
      at ChildProcess.<anonymous> (/Users/roblou/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.10.1001389388/out/client/extension.js:66:794173)
      at ChildProcess.emit (events.js:327:22)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
    category: 'kerneldied',
    exitCode: 1,
    vslsStack: [ CallSite {}, CallSite {}, CallSite {} ]
  },
  stdErr: '\n\n'
}
Error 2021-10-27 14:45:16: failed to start INotebook in kernel, UI Disabled = true i [Error]: 
    at new o (/Users/roblou/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.10.1001389388/out/client/extension.js:16:45228)
    at new i (/Users/roblou/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.10.1001389388/out/client/extension.js:16:110639)
    at y.launch (/Users/roblou/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.10.1001389388/out/client/extension.js:66:795747)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Error: Kernel process Exited
    at ChildProcess.<anonymous> (/Users/roblou/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.10.1001389388/out/client/extension.js:66:794173)
    at ChildProcess.emit (events.js:327:22)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
  category: 'kerneldied',
  originalException: o [Error]: Kernel process Exited
      at ChildProcess.<anonymous> (/Users/roblou/.vscode-insiders/extensions/ms-toolsai.jupyter-2021.10.1001389388/out/client/extension.js:66:794173)
      at ChildProcess.emit (events.js:327:22)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
    category: 'kerneldied',
    exitCode: 1,
    vslsStack: [ CallSite {}, CallSite {}, CallSite {} ]
  },
  stdErr: '\n\n'
}

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Oct 27, 2021

@roblourens can you get it working in Jupyter?
I had the same issue, initially, can't remember what I did to get it working, I went into jupyter to ensure I got things working and then tried VS Code.

@roblourens
Copy link
Member

In Jupyter Lab, it seems to get stuck on "Connecting". Any idea what else I need to do?

@roblourens
Copy link
Member

Actually, it did work in Jupyter Lab on the second try, but still does not work in VS Code

@DonJayamanne
Copy link
Contributor

@roblourens let's chat tomorrow,

@greazer greazer modified the milestones: October 2021, November 2021 Nov 4, 2021
@greazer greazer added needs-triage info-needed Issue requires more information from poster and removed needs-triage labels Nov 4, 2021
@greazer greazer removed this from the November 2021 milestone Nov 8, 2021
@DonJayamanne
Copy link
Contributor

@ted1277 Please could you test this on the latest version of VS Code, we believe this has been resolved.

@yfzhao20
Copy link
Author

Thank you developer👏! Now I can run Wolfram Kernel on VSCode like that:

1111

However here I find a problem: if I enable any "Wolfram language server" plugin, then I can not run the code. Why?

1111

Thanks again for your effort!

@DonJayamanne
Copy link
Contributor

However here I find a problem: if I enable any "Wolfram language server" plugin, then I can not run the code. Why?

Please could you file a separate bug (I'll look into that) with the logs from the Jupyter output panel and console window wishing with the versions of all extensions.

Closing as verified. Thanks a lot.

@DonJayamanne DonJayamanne added the verified Verification succeeded label Nov 12, 2021
@yfzhao20
Copy link
Author

yfzhao20 commented Nov 12, 2021

log of Jupyter when starting it:

log
Info 2021-11-13 00:16:57: Experimentation service retrieved: [object Object]
用户属于实验组 'jupyterTest'
用户属于实验组 'jupyterEnhancedDataViewer'
Info 2021-11-13 00:16:57: ZMQ install verified.
Info 2021-11-13 00:16:57: Find preferred kernel for file:///c%3A/Users/zhaoyifei5053/OneDrive/2-homework/00632-%E5%9F%BA%E7%A1%80%E7%89%A9%E7%90%86%E5%AD%A63-%E5%A7%9C%E5%BC%80%E5%88%A9%26%E6%9D%8E%E5%B2%A9%E6%9D%BE/img.ipynb with metadata {"kernelspec":{"display_name":"Wolfram Language 12.3","language":"Wolfram Language","name":"wolframlanguage12.3"},"language_info":{"codemirror_mode":"mathematica","file_extension":".m","mimetype":"application/vnd.wolfram.m","name":"Wolfram Language","pygments_lexer":"mathematica","version":"12.0"},"orig_nbformat":4} & preferred interpreter {}
Info 2021-11-13 00:16:57: findPreferredKernel score for Wolfram Language 12.3 is 15
Info 2021-11-13 00:16:57: findPreferredKernel score for Python 3.9.4 64-bit is -1
Info 2021-11-13 00:16:57: findKernel found Wolfram Language 12.3
Info 2021-11-13 00:16:57: Find kernel spec, Class name = k, completed in 187ms, has a truthy return value, Arg 1: <Uri:c:\Users\zhaoyifei5053\OneDrive\2-homework\00632-基础物理学3-姜开利&李岩松\img.ipynb>, Arg 2: {"kernelspec":{"display_name":"Wolfram Language 12.3","language":"Wolfram Language","name":"wolframlanguage12.3"},"language_info":{"codemirror_mode":"mathematica","file_extension":".m","mimetype":"application/vnd.wolfram.m","name":"Wolfram Language","pygments_lexer":"mathematica","version":"12.0"},"orig_nbformat":4}, Arg 3: {"_isCancelled":false,"_emitter":{"_disposed":false,"_listeners":{"_first":{"next":{},"prev":{}},"_last":{"next":{},"prev":{}},"_size":1}}}, Return Value: {"kind":"startUsingKernelSpec","kernelSpec":{"specFile":"C:\\Users\\zhaoyifei5053\\AppData\\Roaming\\jupyter\\kernels\\wolframlanguage12.3\\kernel.json","name":"wolframlanguage12.3","argv":["D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","-script","C:\\Users\\zhaoyifei5053\\AppData\\Roaming\\WolframEngine\\Paclets\\Repository\\WolframLanguageForJupyter-0.9.2\\Resources\\KernelForWolframLanguageForJupyter.wl","{connection_file}"],"language":"Wolfram Language","path":"D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","display_name":"Wolfram Language 12.3"},"id":".wolframlanguage12.3.D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe..d:\\0-software\\wolfram research\\wolfram engine\\12.3\\wolfram.exe#-script#c:\\users\\zhaoyifei5053\\appdata\\roaming\\wolframengine\\paclets\\repository\\wolframlanguageforjupyter-0.9.2\\resources\\kernelforwolframlanguageforjupyter.wl#{connection_file}"}
Info 2021-11-13 00:16:57: PreferredConnection: .wolframlanguage12.3.D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe..d:\0-software\wolfram research\wolfram engine\12.3\wolfram.exe#-script#c:\users\zhaoyifei5053\appdata\roaming\wolframengine\paclets\repository\wolframlanguageforjupyter-0.9.2\resources\kernelforwolframlanguageforjupyter.wl#{connection_file} found for NotebookDocument: file:///c%3A/Users/zhaoyifei5053/OneDrive/2-homework/00632-%E5%9F%BA%E7%A1%80%E7%89%A9%E7%90%86%E5%AD%A63-%E5%A7%9C%E5%BC%80%E5%88%A9%26%E6%9D%8E%E5%B2%A9%E6%9D%BE/img.ipynb
Info 2021-11-13 00:16:57: Setting setActiveController for file:///c%3A/Users/zhaoyifei5053/OneDrive/2-homework/00632-%E5%9F%BA%E7%A1%80%E7%89%A9%E7%90%86%E5%AD%A63-%E5%A7%9C%E5%BC%80%E5%88%A9%26%E6%9D%8E%E5%B2%A9%E6%9D%BE/img.ipynb
Info 2021-11-13 00:16:57: KernelProvider switched kernel to id = .wolframlanguage12.3.D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe..d:\0-software\wolfram research\wolfram engine\12.3\wolfram.exe#-script#c:\users\zhaoyifei5053\appdata\roaming\wolframengine\paclets\repository\wolframlanguageforjupyter-0.9.2\resources\kernelforwolframlanguageforjupyter.wl#{connection_file}
Info 2021-11-13 00:16:57: Starting Notebook in kernel.ts id = .wolframlanguage12.3.D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe..d:\0-software\wolfram research\wolfram engine\12.3\wolfram.exe#-script#c:\users\zhaoyifei5053\appdata\roaming\wolframengine\paclets\repository\wolframlanguageforjupyter-0.9.2\resources\kernelforwolframlanguageforjupyter.wl#{connection_file}
Info 2021-11-13 00:16:57: Creating raw notebook for file:///c%3A/Users/zhaoyifei5053/OneDrive/2-homework/00632-%E5%9F%BA%E7%A1%80%E7%89%A9%E7%90%86%E5%AD%A63-%E5%A7%9C%E5%BC%80%E5%88%A9%26%E6%9D%8E%E5%B2%A9%E6%9D%BE/img.ipynb
Info 2021-11-13 00:16:57: Getting preferred kernel for file:///c%3A/Users/zhaoyifei5053/OneDrive/2-homework/00632-%E5%9F%BA%E7%A1%80%E7%89%A9%E7%90%86%E5%AD%A63-%E5%A7%9C%E5%BC%80%E5%88%A9%26%E6%9D%8E%E5%B2%A9%E6%9D%BE/img.ipynb
Info 2021-11-13 00:16:57: Computing working directory file:///c%3A/Users/zhaoyifei5053/OneDrive/2-homework/00632-%E5%9F%BA%E7%A1%80%E7%89%A9%E7%90%86%E5%AD%A63-%E5%A7%9C%E5%BC%80%E5%88%A9%26%E6%9D%8E%E5%B2%A9%E6%9D%BE/img.ipynb
Info 2021-11-13 00:16:57: Connecting to raw session for file:///c%3A/Users/zhaoyifei5053/OneDrive/2-homework/00632-%E5%9F%BA%E7%A1%80%E7%89%A9%E7%90%86%E5%AD%A63-%E5%A7%9C%E5%BC%80%E5%88%A9%26%E6%9D%8E%E5%B2%A9%E6%9D%BE/img.ipynb with connection {"kind":"startUsingKernelSpec","kernelSpec":{"specFile":"C:\\Users\\zhaoyifei5053\\AppData\\Roaming\\jupyter\\kernels\\wolframlanguage12.3\\kernel.json","name":"wolframlanguage12.3","argv":["D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","-script","C:\\Users\\zhaoyifei5053\\AppData\\Roaming\\WolframEngine\\Paclets\\Repository\\WolframLanguageForJupyter-0.9.2\\Resources\\KernelForWolframLanguageForJupyter.wl","{connection_file}"],"language":"Wolfram Language","path":"D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","display_name":"Wolfram Language 12.3"},"id":".wolframlanguage12.3.D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe..d:\\0-software\\wolfram research\\wolfram engine\\12.3\\wolfram.exe#-script#c:\\users\\zhaoyifei5053\\appdata\\roaming\\wolframengine\\paclets\\repository\\wolframlanguageforjupyter-0.9.2\\resources\\kernelforwolframlanguageforjupyter.wl#{connection_file}"}
Info 2021-11-13 00:16:57: Starting raw kernel Wolfram Language 12.3
Info 2021-11-13 00:16:57: Kernel launching with ports 9000,9001,9002,9003,9004. Start port is 9000
Info 2021-11-13 00:16:57: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
Info 2021-11-13 00:16:57: Loading kernelspec from C:\Users\zhaoyifei5053\AppData\Roaming\jupyter\kernels\python3\kernel.json for undefined
Info 2021-11-13 00:16:57: Loading kernelspec from C:\Users\zhaoyifei5053\AppData\Roaming\jupyter\kernels\wolframlanguage12.3\kernel.json for undefined
Info 2021-11-13 00:16:58: Launching Raw Kernel & not daemon Wolfram Language 12.3 # D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe
Info 2021-11-13 00:16:58: No custom variables for Kernel as interpreter path is not defined for kernel Wolfram Language 12.3
Info 2021-11-13 00:16:58: TargetController found ID: .wolframlanguage12.3.D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe..d:\0-software\wolfram research\wolfram engine\12.3\wolfram.exe#-script#c:\users\zhaoyifei5053\appdata\roaming\wolframengine\paclets\repository\wolframlanguageforjupyter-0.9.2\resources\kernelforwolframlanguageforjupyter.wl#{connection_file} for document file:///c%3A/Users/zhaoyifei5053/OneDrive/2-homework/00632-%E5%9F%BA%E7%A1%80%E7%89%A9%E7%90%86%E5%AD%A63-%E5%A7%9C%E5%BC%80%E5%88%A9%26%E6%9D%8E%E5%B2%A9%E6%9D%BE/img.ipynb
Info 2021-11-13 00:16:58: Setting controller affinity for file:///c%3A/Users/zhaoyifei5053/OneDrive/2-homework/00632-%E5%9F%BA%E7%A1%80%E7%89%A9%E7%90%86%E5%AD%A63-%E5%A7%9C%E5%BC%80%E5%88%A9%26%E6%9D%8E%E5%B2%A9%E6%9D%BE/img.ipynb .wolframlanguage12.3.D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe..d:\0-software\wolfram research\wolfram engine\12.3\wolfram.exe#-script#c:\users\zhaoyifei5053\appdata\roaming\wolframengine\paclets\repository\wolframlanguageforjupyter-0.9.2\resources\kernelforwolframlanguageforjupyter.wl#{connection_file}
Info 2021-11-13 00:16:58: Process Execution: > D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe -script ~\AppData\Roaming\WolframEngine\Paclets\Repository\WolframLanguageForJupyter-0.9.2\Resources\KernelForWolframLanguageForJupyter.wl C:\Users\ZHAOYI~1\AppData\Local\Temp\tmp-17776UQk8SFkBlc8k.json
> D:\0-SOFTWARE\Wolfram Research\Wolfram Engine\12.3\wolfram.exe -script ~\AppData\Roaming\WolframEngine\Paclets\Repository\WolframLanguageForJupyter-0.9.2\Resources\KernelForWolframLanguageForJupyter.wl C:\Users\ZHAOYI~1\AppData\Local\Temp\tmp-17776UQk8SFkBlc8k.json
Info 2021-11-13 00:16:58: Process Execution: cwd: c:\Users\zhaoyifei5053\OneDrive\2-homework\00632-基础物理学3-姜开利&李岩松
cwd: c:\Users\zhaoyifei5053\OneDrive\2-homework\00632-基础物理学3-姜开利&李岩松
Info 2021-11-13 00:16:58: Launching kernel in kernelProcess.ts, Class name = y, completed in 25ms, has a truthy return value, Arg 1: "c:\\Users\\zhaoyifei5053\\OneDrive\\2-homework\\00632-基础物理学3-姜开利&李岩松", Return Value: {"proc":{"_events":{},"_eventsCount":0,"_closesNeeded":3,"_closesGot":0,"connected":false,"signalCode":null,"exitCode":null,"killed":false,"spawnfile":"D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","_handle":{"pid":18264},"spawnargs":["D:\\0-SOFTWARE\\Wolfram Research\\Wolfram Engine\\12.3\\wolfram.exe","-script","C:\\Users\\zhaoyifei5053\\AppData\\Roaming\\WolframEngine\\Paclets\\Repository\\WolframLanguageForJupyter-0.9.2\\Resources\\KernelForWolframLanguageForJupyter.wl","C:\\Users\\ZHAOYI~1\\AppData\\Local\\Temp\\tmp-17776UQk8SFkBlc8k.json"],"pid":18264,"stdin":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null,"readable":false},"_events":{},"_eventsCount":1,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stdout":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stderr":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"stdio":[{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null,"readable":false},"_events":{},"_eventsCount":1,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":2,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"writable":false,"closeEmitted":false},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null}]},"out":{"_isScalar":false}}
Info 2021-11-13 00:16:58: Loading kernelspec from D:\0-SOFTWARE\Python39\share\jupyter\kernels\python3\kernel.json for D:\0-SOFTWARE\Python39\python.exe
Info 2021-11-13 00:16:58: Process Execution: > D:\0-SOFTWARE\Python39\python.exe -c "import notebook"
> D:\0-SOFTWARE\Python39\python.exe -c "import notebook"
Info 2021-11-13 00:16:58: Process Execution: > D:\0-SOFTWARE\Python39\python.exe -c "import notebook"
> D:\0-SOFTWARE\Python39\python.exe -c "import notebook"
Info 2021-11-13 00:16:58: Process Execution: > D:\0-SOFTWARE\Python39\python.exe -c "import jupyter"
> D:\0-SOFTWARE\Python39\python.exe -c "import jupyter"
Info 2021-11-13 00:16:58: Process Execution: > D:\0-SOFTWARE\Python39\python.exe -c "import jupyter"
> D:\0-SOFTWARE\Python39\python.exe -c "import jupyter"
Info 2021-11-13 00:16:58: Process Execution: > D:\0-SOFTWARE\Python39\python.exe -m pip list
> D:\0-SOFTWARE\Python39\python.exe -m pip list
Info 2021-11-13 00:16:58: Process Execution: > D:\0-SOFTWARE\Python39\python.exe -m pip list
> D:\0-SOFTWARE\Python39\python.exe -m pip list
Info 2021-11-13 00:16:58: Hiding default kernel spec Python 3 (ipykernel), python
Info 2021-11-13 00:16:58: Hiding default kernel spec Python 3 (ipykernel), python
Info 2021-11-13 00:16:58: Hiding default kernel spec Python 3 (ipykernel), python
Info 2021-11-13 00:16:58: Registering dummy command feature
Info 2021-11-13 00:16:59: Process Execution: > D:\0-SOFTWARE\Python39\python.exe -m jupyter kernelspec --version
> D:\0-SOFTWARE\Python39\python.exe -m jupyter kernelspec --version
Info 2021-11-13 00:16:59: Process Execution: > D:\0-SOFTWARE\Python39\python.exe -m jupyter kernelspec --version
> D:\0-SOFTWARE\Python39\python.exe -m jupyter kernelspec --version
Warn 2021-11-13 00:17:02: Didn't get response for requestKernelInfo
Warn 2021-11-13 00:17:02: Didn't get response for requestKernelInfo
Warn 2021-11-13 00:17:02: Didn't get response for requestKernelInfo
Info 2021-11-13 00:17:02: Raw session started and connected
启动内核 Wolfram Language 12.3
Info 2021-11-13 00:17:02: Finished connecting 07196dc9-d074-44b3-bc29-c0dfc48d002f
Info 2021-11-13 00:17:03: Waiting for idle on (kernel): 7563b5cf-def7-417a-9dcc-3d3ec57d39b7 -> idle
Info 2021-11-13 00:17:03: Finished waiting for idle on (kernel): 7563b5cf-def7-417a-9dcc-3d3ec57d39b7 -> idle
Info 2021-11-13 00:17:03: IPyWidgetScriptSource.initialize

and then when I click "执行单元格(Execute cell)" or "全部运行(run all)" then nothing happens, as that gif shows..with no log. If I change "Language Mode" into "Jupyter" or even "Plain text" , it works well. Strange it may seems.

I change "Language Mode" into "jupyter" and run the code. Logs are here:

Info 2021-11-13 00:28:26: Execute Cells request 1 0
Info 2021-11-13 00:28:26: Execute Cell 0 file:///c%3A/Users/zhaoyifei5053/OneDrive/2-homework/00632-%E5%9F%BA%E7%A1%80%E7%89%A9%E7%90%86%E5%AD%A63-%E5%A7%9C%E5%BC%80%E5%88%A9%26%E6%9D%8E%E5%B2%A9%E6%9D%BE/img.ipynb

main extensions & version:

  • ms-toolsai.jupyter 2021.10.1001414422
  • ms-python.python 2021.11.1422169775
  • shigma.vscode-wl 1.7.3

Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2022
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 language-any Area covering general issues geared to supporting any language (not just Python) notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants