question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using python interactiv "Run Cell" result in Extension Host terminated unexpectedly

See original GitHub issue

Environment data

  • VS Code version: November 2020 (version 1.52)
  • Extension version (available under the Extensions sidebar): v2020.12.424452561
  • OS and version: Ubuntu 20.04
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): virtualenv
  • Relevant/affected Python-related VS Code extensions and their versions: Pylance v2020.12.2 and Jupiter v2020.12.414227025
  • Value of the python.languageServer setting: “Pylance”

Expected behaviour

Using python interactive “Run cell” I would expect to navigate thought my python code on a .py file

Actual behaviour

If I click on “Run cell” a Extension Host terminated unexpectedly error occur

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. touch a hello.py file
  2. type print("Hello")
  3. click “run cell”

Logs

Screenshot from 2020-12-22 09-04-43

Details:

  • the environment is picked up corrctly
  • everything works fine when I click the “run python file in terminal icon”
  • Thanks for your help!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
BjMrqcommented, Dec 23, 2020

Thanks for pointing me in the right direction.

IProblem is my system does have the required glibcss (up to GLIBCXX_3.4.28) running strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX

But since I have installed vscode using snap I think extensions run against the runtime of the snap wich only goes up to GLIBCXX_3.4.21 running strings /snap/core/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX

So I guess resolution would be to install vscode from elsewhere or wait for snap to update it’s runtime

cf https://forum.snapcraft.io/t/vscode-glibc-6-needs-update/21088

Installing Visual Studio Code with apt solved the problem

0reactions
IanMatthewHuffcommented, Dec 23, 2020

@BjMrq Thanks. That log has a pretty clear error point. Looks like on the version of linux that you have there are some issues with libstdc++ which is required by the zmq module that we use for communication with the kernel. Here is the error in question:

Error 2020-12-23 09:12:41: Exception while attempting zmq : [Error: /snap/core/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /home/bjmrq/.vscode/extensions/ms-toolsai.jupyter-2020.12.414227025/out/client/node_modules/zeromq/prebuilds/linux-x64/electron.napi.glibc.node)

The tricky bit is that the solution here might be OS dependent, so I can’t exactly point you at the precise fix that you need. I took a quick peek online regarding that error, and I see a number of report of linux machines failing to work with ZMQ based on a version of the above error. Looks like some of these might help?

https://stackoverflow.com/questions/48453497/anaconda-libstdc-so-6-version-glibcxx-3-4-20-not-found https://stackoverflow.com/questions/52419004/cannot-run-executable-of-c-zmq-project-on-linux https://stackoverflow.com/questions/38167639/glibcx-3-4-21-not-found

General search that I was using to find these issues: https://www.google.com/search?q=zmq+clibcxx+not+found

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using python interactiv "Run Cell" result in Extension Host ... - GitHub
Using python interactive "Run cell" I would expect to navigate thought my ... If I click on "Run cell" a Extension Host terminated...
Read more >
VSCode Python Extension: Extension host terminated ...
I can successfully open and run Python files in remote WSL instances using VSCode, just not in Windows. [Edit: The problem turns out...
Read more >
Extension Host Terminated Unexpectedly Jupyter Notebook ...
CSDNExtension host terminated unexpectedly when modifying markdown cell Jupyter server running: Local; Extension version: 2020.5.80290; VS Code version: 1.45.1; ...
Read more >
User and Workspace Settings - Visual Studio Code
In general, VS Code extensions store their settings in your user or workspaces settings files and they are available through the Settings editor...
Read more >
Changelog — Python 3.11.1 documentation
Python next: Release date: XXXX-XX-XX Core and Builtins: gh-100374: Fix incorrect result and delay in socket.getfqdn(). Patch by Dominic Socular., ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found