Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code can't open ipynb file

Have everyone already had this problem, where VS Code keeps loading all the time and won't open a ipynb file? I've tried to use python 3.7 but same problem. Also tried to reinstall both VS Code and Anaconda, no success.

enter image description here

Here is my environment data:

  • VS Code version: 1.49.0
  • Python extension version: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 base environment
  • Value of the python.languageServer setting: "Pylance"
  • ipython version: 7.16.1
  • jedi version: 0.17.1
  • ipykernel version: 5.3.2
like image 610
Henrique Branco Avatar asked Sep 12 '20 02:09

Henrique Branco


4 Answers

I've solved (for now) this problem by downgrading jupyter extension to previous version.

Go to Extension (in the left vertical panel) > select Jupyter > click the down arrow of the Uninstall button > then you get "install another version" tooltip > click it > select other version > reload vscode

like image 150
m10s Avatar answered Oct 20 '22 03:10

m10s


For me maximizing and resetting the terminal panel didn't work whereas uninstalling and reinstalling the VSCode Python extension solved the problem.

like image 21
jost Avatar answered Oct 20 '22 02:10

jost


In their official GitHub page, they are tracking this issue already. There is also a solution (kind of) right now. You have to maximize the terminal panel below and then restore the panel size (basically max and min with the arrow button). Then the Notebook loads and everything works fine. :D

The workaround was in this comment: https://github.com/microsoft/vscode-python/issues/13901#issuecomment-691625412

Not perfect but at least all the features are there and I can work with my notebooks again :)

like image 3
PowderFan Avatar answered Oct 20 '22 03:10

PowderFan


I'm facing the same issue after the latest update. You can try importing the notebook by pressing ctrl+shift+p/command+shift+p and run Import Jupyter Notebook.

like image 1
Maharsh Suryawala Avatar answered Oct 20 '22 02:10

Maharsh Suryawala