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.

https://user-images.githubusercontent.com/15109293/217343613-0a310b8d-65d9-4682-8748-056f57dfec72.mov

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:

  1. minikube start
  2. kubectl create deployment jupyter --image=jupyter/scipy-notebook:python-3.9.12
  3. kubectl expose deployment jupyter --type=NodePort --port=8888
  4. 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": {},
}
  1. IMPORTANT You need to update the podname=jupyter-6f844c7b46-hrpf6 bit to match yours.
  2. File > Open Workspace from File... selecting test.code-workspace above.
  3. Install the Jupyter and Python extensions code --install-extension ms-toolsai.jupyter --install-extension ms-python.python
  4. Create and save a new jupyter notebok inside /home/jovya/work using the command palette: > Create: New Jupyter Notebook.
  5. Open the new notebook and add some code to a cell. e.g. print("Hello, World!")
  6. Select the base (Python 3.9.12) kernel to run the notebook Screenshot 2023-02-07 at 20 11 20
  7. 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)

Most upvoted comments

im facing similar issue. Any updates on this?