Vscode-jupyter: VS Code can't open .ipynb files

Created on 12 Sep 2020  路  48Comments  路  Source: microsoft/vscode-jupyter

Environment data

  • VS Code version: 1.49.0
  • Extension version (available under the Extensions sidebar): v2020.8.108011
  • OS and version: Ubuntu 20.04
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda python 3.8.3
  • Type of virtual environment used: using conda environment
  • Value of the python.languageServer setting: "Pylance"
  • ipython version: 7.16.1
  • jedi version: 0.17.1
  • ipykernel version: 5.3.2

Expected behaviour

VS Code could open .ipynb normally. It's opening normally in Jupiter Notebook

Actual behaviour

VS Code keeps loading all the time and won't open the .ipynb file.

Steps to reproduce:

  1. Open VS Code
  2. Open any .ipynb file.

gif_vscode

bug

Most helpful comment

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

All 48 comments

Same issue here - windows 10.

Same here

Interactive python (with cells marked by #%%) works fine

Anaconda x64 Python 3.8.5

Version: 1.49.0 (system setup)
Commit: e790b931385d72cf5669fcefc51cdf65990efa5d
Date: 2020-09-10T13:22:08.892Z (2 days ago)
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

Same issue here, same environment, was working fine yesterday. There was a VS code update and a windows update in the past few days.

same issue windows 10 wsl2 Anaconda

After updating VS code I also faced the same issue.
OS -- Linux Based (Ubuntu 18.04)
Vs code - 1.49.0
Python 3.8.2
using pip packages.

I reinstalled a prior version of VS Code and now I can once again open .Ipynb files no problem. I went from VS Code 1.49 down to 1.46.

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

same issues here, I can't open any file .ipynb it still loading but doesn't show any error

same issue here, cannot open any ipynb files

Same issue here.

Same issue here

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

worked for me

I reinstalled a prior version of VS Code and now I can once again open .Ipynb files no problem. I went from VS Code 1.49 down to 1.46.

Didn't work for me. I'm receiving this message now:

image

Any other alternatives?

There is a similar issue here. It's seems a bug of version 1.49...

Hi all, thanks for bringing this to our attention and sorry for the trouble. I can repro this and it appears to be associated with the 1.49 upgrade. We'll look into this.

Same Issue here

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

works for me, thanks !

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

Worked For Me Thanks.

Same issue on Ubuntu 20.04 VS Code version 1.49.0, tried reinstall jupyter (all including kernel) - not helped

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

Works for me, but needed to do each time i open vscode

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

It worked, thanks mate

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

Wow. I don't understand why this works, but I'll take it. Thanks mate!

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

Worked for me, thanks !!

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...
photo-2020-09-13-10-14-28

Wow. I don't understand why this works, but I'll take it. Thanks mate!

Behaves as if the panel is loading the document then waiting for a screen redraw event, which never comes as there is nothing on the screen. Closing and opening the panel provides a screen draw event which displays the notebook.

What is more critical is how this bug got through QA and into a global release on a Friday as the team is going home for the weekend. It's sloppy and needs explaining to everyone that spent time having to find workarounds for over 48 hours.

This should be an upstream problem (well as far as we know right now):
https://github.com/microsoft/vscode/issues/106587.

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

Worked for me on macOS 10.15.6. Spent half an hour scratching my head on this, almost turned bald.

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

Works for me

@huyho2311 I used the command palette: "Toggle Maximize Panel" to cause the maximize to occur.

@huyho2311 I used the command palette: "Toggle Maximize Panel" to cause the maximize to occur.

thanks, I just pulled up the panel and saw it, of course it would be there hahaha

I have the same issue(cannot load .piynb after upgrade VS code). and the minimize-maximize the panel works for me.

Is there an ETA for the fix?

until a proper fix comes out, just click on Maximize Panel Size then on the same button again to open your notebook ...

photo-2020-09-13-10-14-28

Works for me, but needed to do each time i open vscode

I've just completely uninstalled VS Code from ubuntu, including all config files and reinstalled it. Now working normally.

Noticed the extension update asking for window reload. After reloading, I can confirm that this issue is fixed.

just some minor issue is now happening, when closing vscode with some opened files, you should expect to see them opened the next time you launch vscode on that directory; not with *.ipynb notebooks; they're now closed and have to be clicked on to start. Also the *.ipynb file icon is not loading on the opened file tab.

OS: Windows 10 20H2

just some minor issue is now happening, when closing vscode with some opened files, you should expect to see them opened the next time you launch vscode on that directory; not with *.ipynb notebooks; they're now closed and have to be clicked on to start. Also the *.ipynb file icon is not loading on the opened file tab.

@7kemZmani that's exactly the experiment we turned on. It fixed file associations with ipynb files. Once VS code ships the root cause of the problem in microsoft/vscode-python#13901 we'll be able to turn this back on.

Removed VS code (version: 1.49) and it's config files . After reinstalling .ipynb files started opening (version: 1.47)

This fix here should make this all work when we finally ship our September release:
https://github.com/microsoft/vscode-python/pull/13371

The root cause of this issue is:

  • we turned on an experiment for enabling custom editor support by mistake.
  • we had a bug with our custom editor support that we hadn't shipped yet
  • maximizing VS code (or opting out of the experiment) works around this bug.

Right now the experiment is turned off again so as long as you reload VS code you shouldn't be hitting this bug anymore.

Looks like it has been fixed in 1.49.1 version and Notebooks are loading.

Hi, I have updated to version 1.51 this morning and this issue BACK FROM DEAD! and the previous trick (maximize panel) no longer works..
Solved by down-grade to version 1.47

Hi @QPeiran thanks for letting us know. Could you please file a new issue at http://github.com/microsoft/vscode-python/issues/new/choose and provide logs from the 'Python' output panel please? That will help us figure out what's going on here.

Hi, I have updated to version 1.51 this morning and this issue BACK FROM DEAD! and the previous trick (maximize panel) no longer works..
Solved by down-grade to version 1.47

I have no problems with opening .ipynb in VSC 1.51.0

Getting the following message

Unable to open 'scratch.ipynb (Working Tree)': Using the Jupyter notebook editor requires the stable version of VS code and the CustomEditor experiment to be enabled..****

Version: 1.51.1
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-10T23:31:29.624Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Linux x64 5.4.0-54-generic snap

Ubuntu 18.04

The above-mentioned approaches didn't work for me.

Same issue here with 1.51.1
Windows 10 2020H2

Same issue, was working fine until I updated to 1.51.1...

https://github.com/microsoft/vscode-jupyter/issues/486
Update both vscode and python extention worked for me

486

Update both vscode and python extention worked for me

@QPeiran can you provide your version details ?

486

Update both vscode and python extention worked for me

@QPeiran can you provide your version details ?

VSCode version: 1.51.0
Python Extention: v2020.10.332292344

486

Update both vscode and python extention worked for me

@QPeiran can you provide your version details ?

VSCode version: 1.51.0
Python Extention: v2020.10.332292344

Issue persists in my case, windows OS is giving a different error message

StdErr from ShellExec, Did not find path entry D:\Anaconda\bin
Did not find path entry D:\Anaconda\bin
 for D:/Anaconda/Scripts/activate && conda activate base && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:\Users\user_name\.vscode\extensions\ms-python.python-2020.11.371526539\pythonFiles\pyvsc-run-isolated.py c:/Users/user_name/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/printEnvVariables.py

Version: 1.51.1 (system setup)
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-10T23:34:32.027Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

Both anaconda and vs code are added to system variables.

486

Update both vscode and python extention worked for me

@QPeiran can you provide your version details ?

VSCode version: 1.51.0
Python Extention: v2020.10.332292344

Issue persists in my case, windows OS is giving a different error message

StdErr from ShellExec, Did not find path entry D:\Anaconda\bin
Did not find path entry D:\Anaconda\bin
 for D:/Anaconda/Scripts/activate && conda activate base && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:\Users\user_name\.vscode\extensions\ms-python.python-2020.11.371526539\pythonFiles\pyvsc-run-isolated.py c:/Users/user_name/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/printEnvVariables.py

Version: 1.51.1 (system setup)
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-10T23:34:32.027Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

Both anaconda and vs code are added to system variables.

@biplavc I didn't use ananconda -- pipenv instead

Was this page helpful?
0 / 5 - 0 ratings