Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activating venv to run Jupyter failed #8112

Closed
oryon-dominik opened this issue Oct 19, 2019 · 5 comments
Closed

Activating venv to run Jupyter failed #8112

oryon-dominik opened this issue Oct 19, 2019 · 5 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug regression Bug didn't exist in a previous release

Comments

@oryon-dominik
Copy link

Bug: Notebook Editor, Interactive Window, Python Editor cells

Steps to cause the bug to occur

  1. Run any cell in any jupyter-notebook in vscode
  2. causes an error: Activating Python 3.8.0 64-bit ('myenv': venv) to run Jupyter failed with Error: StdErr from ShellExec, Parameterformat falsch - 850.

Vscode recognizes the venv in the terminal. "python.pythonPath": "C:\\Users\\myname\\Envs\\myenv\\Scripts\\python.exe", works as expected.
python -m jupyter notebook --version also works as expected and returns 6.0.1.

(tornado had a bug on python3.8 though, which I manually fixed with the solution in tornadoweb/tornado#2751 )

Actual & Expected behavior

activate the notebook in the venv and run the cell with no errors

Your Jupyter and/or Python environment

  • Jupyter server running: Local
  • Extension version: 2019.10.41019
  • VS Code version: 1.39.2
  • Setting python.jediEnabled: false
  • Python and/or Anaconda version: 3.8.0
  • OS: Windows 1903
  • Virtual environment: venv

Developer Tools Console Output

Error Python Extension: 2019-10-19 14:59:31: getActivatedEnvironmentVariables [Error: StdErr from ShellExec, Parameterformat falsch - 850.
at _.getActivatedEnvironmentVariables (c:\Users\myname.vscode\extensions\ms-python.python-2019.10.41019\out\client\extension.js:75:1244856)]

Error Python Extension: 2019-10-19 14:59:31: getActivatedEnvironmentVariables, Class name = _, completed in 218ms, Arg 1: undefined, Arg 2: {"architecture":3,"path":"C:\Users\myname\envs\myenv\Scripts\python.exe","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"3.8.0-final","major":3,"minor":8,"patch":0,"prerelease":["final"],"build":[],"version":"3.8.0-final"},"sysPrefix":"C:\Users\myname\envs\myenv","fileHash":"3825012762f2f81474bab568edd5862c7d432337a71852b5d2af2aa0751a97044ebbfb6887e92fd505aeed6dca87c236403040442555e4b92464ffbb485ced96","envName":"myenv","type":"Venv","displayName":"Python 3.8.0 64-bit ('myenv': venv)"}, Arg 3: true { [Error: StdErr from ShellExec, Parameterformat falsch - 850.
at _.getActivatedEnvironmentVariables (c:\Users\myname.vscode\extensions\ms-python.python-2019.10.41019\out\client\extension.js:75:1244856)] vslsStack: [ CallSite {} ] }

@oryon-dominik oryon-dominik added data science bug Issue identified by VS Code Team member as probable bug labels Oct 19, 2019
@LumenYoung
Copy link

This is the problem that I also encoutered, searching for help

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Oct 21, 2019
@rchiodo
Copy link

rchiodo commented Oct 21, 2019

Actually this problem isn't specific to data science. This looks like a bug in the getActivatedEnvironmentVariables?

@karthiknadig karthiknadig self-assigned this Oct 21, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Oct 21, 2019
@brettcannon brettcannon added reason-preexisting regression Bug didn't exist in a previous release and removed reason-preexisting labels Oct 23, 2019
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Oct 28, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Oct 28, 2019
@gramster gramster modified the milestone: DS Bucket Oct 28, 2019
@reekystive
Copy link

reekystive commented Nov 12, 2019

I did not encounter any errors when using Python 3.7.5.

But after I upgraded to Pyhton 3.8.0, when I executed Run Current File in Python Interactive Window, I got this:

Executing code failed : Error: Jupyter server crashed. Unable to connect. 
Error code from jupyter: 1

This is the error of Jupyter itself on Python 3.8.0, so I manually followed this to fix the error:

jupyter/notebook#4613

It now works fine when running jupyter notebook in Command Prompt, but I encountered this when I was running in vscode:

Failed to connect to Jupyter notebook. 
http://localhost:8888/
Error: Invalid response: 500 Internal Server Error

Asking for help now.

My info:

VS Code -> Help -> About

Version: 1.40.0 (system setup)
Commit: 86405ea23e3937316009fc27c9361deee66ffbf5
Date: 2019-11-06T17:02:13.381Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18362
> python --version
Python 3.8.0

> pip --version
pip 19.3.1 from ...\python38\lib\site-packages\pip (python 3.8)

> jupyter --version
jupyter core     : 4.6.1
jupyter-notebook : 6.0.2
qtconsole        : 4.5.5
ipython          : 7.9.0
ipykernel        : 5.1.3
jupyter client   : 5.3.4
jupyter lab      : not installed
nbconvert        : 5.6.1
ipywidgets       : 7.5.1
nbformat         : 4.4.0
traitlets        : 4.3.3

@huaji1992
Copy link

me too

@luabud luabud added area-environments Features relating to handling interpreter environments and removed feature-* labels May 13, 2020
@luabud
Copy link
Member

luabud commented Apr 13, 2021

Hey folks, this issue seems to be out of date. If you do still experience it, please file a new bug report so we can investigate. Thanks!

@luabud luabud closed this as completed Apr 13, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug regression Bug didn't exist in a previous release
Projects
None yet
Development

No branches or pull requests

9 participants