vscode-jupyter: Cannot open and run a Jupyter Notebook inside a workspace
Type: Bug
After opening a workspace from a .code-workspace
file, errors are encountered when running a Jupyter Notebook
Actual results
Running the Jupyter notebook cells produces no outptut and execution hangs. Another copy of the notebook is immediately opened but from an absolute path instead of the path relative to the workspace directory.
Expected results
You can run the Jupyter notebook cells and see its output.
Steps
You can reproduce the error using minikube to setup a kubernetes cluster locally:
minikube start
kubectl create deployment jupyter --image=jupyter/scipy-notebook:python-3.9.12
kubectl expose deployment jupyter --type=NodePort --port=8888
- Create a
test.code-workspace
file with the following contents:
{
"folders": [
{
"uri": "vscode-remote://k8s-container+context=minikube+podname=jupyter-6f844c7b46-hrpf6+namespace=default+name=scipy-notebook+image=jupyter%2Fscipy-notebook:python-3.9.12/home/jovyan/work"
}
],
"remoteAuthority": "k8s-container+context=minikube+podname=jupyter-6f844c7b46-hrpf6+namespace=default+name=scipy-notebook+image=jupyter%2Fscipy-notebook%3Apython-3.9.12",
"settings": {},
}
- IMPORTANT You need to update the
podname=jupyter-6f844c7b46-hrpf6
bit to match yours. File > Open Workspace from File...
selectingtest.code-workspace
above.- Install the Jupyter and Python extensions
code --install-extension ms-toolsai.jupyter --install-extension ms-python.python
- Create and save a new jupyter notebok inside
/home/jovya/work
using the command palette:> Create: New Jupyter Notebook
. - Open the new notebook and add some code to a cell. e.g.
print("Hello, World!")
- Select the
base (Python 3.9.12)
kernel to run the notebook - Run the notebook cell
Additional context
Extension version: 2023.1.2010391206 VS Code version: Code 1.75.0 (Universal) (e2816fe719a4026ffa1ee0189dc89bdfdbafb164, 2023-02-01T15:24:42.903Z) OS version: Darwin arm64 22.2.0 Modes: Sandboxed: No
System Info
Item | Value |
---|---|
CPUs | Apple M1 Max (10 x 24) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
Load (avg) | 2, 3, 3 |
Memory (System) | 64.00GB (32.59GB free) |
Process Argv | –crash-reporter-id fccc0c5d-88f7-46f7-8935-729cb9c181eb |
Screen Reader | no |
VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
vscccc:30610679
pyindex848cf:30577861
nodejswelcome1cf:30587006
282f8724:30602487
pyind779:30657576
89544117:30613380
pythonsymbol12cf:30657549
2i9eh265:30646982
vsccsb:30659829
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 6
- Comments: 29 (10 by maintainers)
im facing similar issue. Any updates on this?