NumEconCopenhagen / IntroProg-lectures

Introductionary programming lectures
MIT License
30 stars 72 forks source link

"Extension host terminated unexpectedly" #10

Closed gpl942 closed 1 year ago

gpl942 commented 1 year ago

I'm trying to run a lecture notebook but, when running the first python cell, the notebook shuts down. I receive an error message that states "the extension host terminated unexpectedly".

Tried many times with different files. Sometimes it fails even before I ran the first cell, just while scrolling the file.

I tried running the Extension Bisect utility, but then I can't run the code since I've no other kernel base other than python, which is now disabled (being python an extension).

I've recently installed the the DSTapi and the pandas-datareader package. I'm wondering if any incompatibility could be raised by those packages. I'm currently trying to understand how to uninstall them to go for a check.

I've also recently performed an update, prompted by vscode (appearing in the bottom left corner of vscode interface). Anyhow I can't tell the exact content of the update and can't find a way to restore to previous version.

I was wondering if anybody is experiencing a similar problem and if, in case, have found a solution.

gpl942 commented 1 year ago

Follow up: I now managed to run Extension Bisect utility properly. "ms-toolsai.jupyter" has been identified as the extension causing the problem. The full Jupyter extension must be disabled to keep the notebooks open without sudden failures. Anyhow, a consequence is that I can't find Python base as the kernel source so I can't run the code.

AskerNC commented 1 year ago

Hi I haven't encountered anything similar to this before, so I don't have any immediate fixes. You could ask your TA at next class, but I'd also be happy to give it a go if you come by my office (email me at anc@econ.ku.dk to set up a time) sometime during the week. Some brute force approaches: You could try to uninstall/install your jupyter extension in vs code, and also uninstall/install VS code itself (relatedly it is possible to install a past version of vs code: https://stackoverflow.com/questions/49346733/how-to-downgrade-vscode Best regards, Asker

gpl942 commented 1 year ago

Hi Asker The problem seems to be solved by downgrading Vs Code, Python and Jupyter extensions. I'll open the issue again in case It will happen again, but hopefully it'll not be necessary. Thank you very much

Best regards