Can't start IRkernel
See original GitHub issueApplies To
- Notebooks (.ipynb files)
- Interactive Window and/or Cell Scripts (.py files with #%% markers)
What happened?
I try to use R in Jupyter with IRkernel, and it works well on my Jupyter lab.
But when I tried to use VSCode to open R .ipynb files, I got this:
Seems that jupyter-vscode can’t start this customized kernel correctly. I tried to reinstall the extension or change to pre-release version, but all failed.
In my view, the problem seems to be a wrong format of string? I tried to fix it in the specFile, but can’t solve the problem.
VS Code Version
1.71.0
Jupyter Extension Version
v2022.8.1002431955 & 2022.9.1002511105
Jupyter logs
error 11:42:23.768: Error in execution (get message for cell) o [Error]: The kernel died. Error: Error in open.connection(con, "rb") : cannot open the connection
Calls: <Anonymous> ... parse_and_simplify -> parseJSON -> parse_con -> open -> open.connection
In addition: Warning message:
In open.connection(con, "rb") :
cannot open file 'r'"c:\Users\Ma Jiahao\AppData\Roaming\jupyter\runtime\kernel-v2-24568JN5dWQkG77fG.json"'': Invalid argument
Execution halted... View Jupyter [log](command:jupyter.viewOutput) for further details.
at ChildProcess.<anonymous> (c:\Users\Ma Jiahao\.vscode\extensions\ms-toolsai.jupyter-2022.9.1002511105\out\extension.node.js:2:2177745)
at ChildProcess.emit (node:events:538:35)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
category: 'kerneldied',
kernelConnectionMetadata: {
kind: 'startUsingLocalKernelSpec',
kernelSpec: {
specFile: '***\\kernel.json',
name: 'ir',
argv: [Array],
language: 'R',
executable: 'C:/PROGRA~1/R/R-42~1.1/bin/x64/R',
display_name: 'R',
metadata: [Object]
},
id: ".ir.c:\\PROGRA~1\\R\\R-42~1.1\\bin\\x64\\R.\\.c:/progra~1/r/r-42~1.1/bin/x64/r#--slave#-e#irkernel::main()#--args#r'{connection_file}'"
},
exitCode: 1,
stdErr: 'Error in open.connection(con, "rb") : cannot open the connection\r\n' +
'Calls: <Anonymous> ... parse_and_simplify -> parseJSON -> parse_con -> open -> open.connection\r\n' +
'In addition: Warning message:\r\n' +
'In open.connection(con, "rb") :\r\n' +
` cannot open file 'r'"c:\\Users\\Ma Jiahao\\AppData\\Roaming\\jupyter\\runtime\\kernel-v2-24568JN5dWQkG77fG.json"'': Invalid argument\r\n` +
### original: '"***\\kernel-v2-24568JN5dWQkG77fG.json"'': Invalid argument\r\n`'"
'Execution halted\r\n'
}
Coding Language and Runtime Version
R 4.2.1 with IRkernel 1.3
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Local
Issue Analytics
- State:
- Created a year ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
IRKernel Fails to Launch Because IRKernel Installed ... - GitHub
I am running R on my local windows computer and trying to access the R kernel in the notebook. Despite the UI recognizing...
Read more >Cannot get IRkernel::installspec() to work, jupyter-client not ...
Now execute IRkernel::installspec() once again, this time there shouldn't be an error; Now you can start an R kernel within Jupyter-Notebook.
Read more >R kernel won't start - Notebook - Jupyter Community Forum
An created an enviroment called 'r_env'. However, when i then go onto Juptyer Notebooks and open a new R file, the kernel cannot...
Read more >How to Install R in Jupyter with IRKernel in 3 Steps?
Proceed to 'Anaconda Navigator' and launch 'Jupyter Notebook'. If you go to the 'New' tab pane, R should appear in the 'Notebooks' section....
Read more >to register the kernel in the current R installation - README
If you have Jupyter installed, you can create a notebook using IRkernel from the dropdown menu. You can also start other interfaces with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve been experiencing an identical error, including the missing json file. Have there been any developments on this front?
Unfortunately still having the same issue. Log output below: