Vscode-python: EOFError: Ran out of input

Created on 22 Jul 2020  路  15Comments  路  Source: microsoft/vscode-python

Issue Type: Bug

6

Error 2020-07-22 20:17:13: stderr jediProxy Error (stderr) Traceback (most recent call last):
  File "c:\Users\aaa\.vscode\extensions\ms-python.python-2020.7.94776\pythonFiles\lib\python\jedi\inference\compiled\subprocess\__init__.py", line 261, in _send
    is_exception, traceback, result = pickle_load(self._get_process().stdout)
  File "c:\Users\aaa\.vscode\extensions\ms-python.python-2020.7.94776\pythonFiles\lib\python\jedi\_compatibility.py", line 396, in pickle_load
    return pickle.load(file, encoding='bytes')
EOFError: Ran out of input

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\aaa\.vscode\extensions\ms-python.python-2020.7.94776\pythonFiles\lib\python\jedi\api\environment.py", line 75, in _get_subprocess
    info = self._subprocess._send(None, _get_info)
  File "c:\Users\aaa\.vscode\extensions\ms-python.python-2020.7.94776\pythonFiles\lib\python\jedi\inference\compiled\subprocess\__init__.py", line 273, in _send
    stderr,
jedi.api.exceptions.InternalError: The subprocess D:\Program-Files\Anaconda3\envs\py36-idea\python.exe has crashed (EOFError('Ran out of input',), stderr=).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\aaa\.vscode\extensions\ms-python.python-2020.7.94776\pythonFiles\completion.py", line 661, in watch
    response = self._process_request(rq)
  File "c:\Users\aaa\.vscode\extensions\ms-python.python-2020.7.94776\pythonFiles\completion.py", line 589, in _process_request
    all_scopes=True,
  File "c:\Users\aaa\.vscode\extensions\ms-python.python-2020.7.94776\pythonFiles\lib\python\jedi\api\__init__.py", line 885, in names
    return Script(source, path=path, encoding=encoding).get_names(
  File "c:\Users\aaa\.vscode\extensions\ms-python.python-2020.7.94776\pythonFiles\lib\python\jedi\api\__init__.py", line 185, in __init__
    project, environment=environment, script_path=self.path
  File "c:\Users\aaa\.vscode\extensions\ms-python.python-2020.7.94776\pythonFiles\lib\python\jedi\inference\__init__.py", line 90, in __init__
    self.compiled_subprocess = environment.get_inference_state_subprocess(self)
  File "c:\Users\aaa\.vscode\extensions\ms-python.python-2020.7.94776\pythonFiles\lib\python\jedi\api\environment.py", line 114, in get_inference_state_subprocess
    return InferenceStateSubprocess(inference_state, self._get_subprocess())
  File "c:\Users\aaa\.vscode\extensions\ms-python.python-2020.7.94776\pythonFiles\lib\python\jedi\api\environment.py", line 80, in _get_subprocess
    exc))
jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'D:\\Program-Files\\Anaconda3\\envs\\py36-idea\\python.exe': InternalError("The subprocess D:\\Program-Files\\Anaconda3\\envs\\py36-idea\\python.exe has crashed (EOFError('Ran out of input',), stderr=).",)

Extension version: 2020.7.94776
VS Code version: Code 1.47.2 (17299e413d5590b14ab0340ea477cdd86ff13daf, 2020-07-15T18:22:06.216Z)
OS version: Windows_NT x64 10.0.18363


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz (4 x 2592)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|15.89GB (7.72GB free)|
|Process Argv|E:\downloads\chrome|
|Screen Reader|no|
|VM|0%|


P1 area-environments reason-regression type-bug

All 15 comments

Hi @jianboy, thank you for reaching out.

It seems like the problem you're having is related to your conda environment, how did you create it?
What happens if you run D:\\Program-Files\\Anaconda3\\envs\\py36-idea\\python.exe -c "import sys; print(sys.executable)"?

Do you have another python installation on your computer that you could use to try and see if this problem also appears there?

Hi @jianboy, thank you for reaching out.

It seems like the problem you're having is related to your conda environment, how did you create it?
What happens if you run D:\\Program-Files\\Anaconda3\\envs\\py36-idea\\python.exe -c "import sys; print(sys.executable)"?

Do you have another python installation on your computer that you could use to try and see if this problem also appears there?

I had installed anaconda successfully.
2020-07-24_213248

running D:\\Program-Files\\Anaconda3\\envs\\py36-idea\\python.exe -c "import sys; print(sys.executable)":

BaiduHi_2020-7-24_21-34-20

I had degrade vscode-python to v2020.3.71113. and it is no error. So I can conclude that it鈥檚 the latest vscode-python plugin problem.

I am experiencing the same issue. I am using Python 3.6.4 and conda 4.4.10. The issue only manifests with virtual environments (created via conda).

I've checked previous releases, and this issue was introduced in 2020.7.94776. Previous release 2020.6.91350 is unaffected.

My procedure for testing/downgrade was as follows:

  • Remove python-related settings from settings.json
  • Set "extension.autoUpdate" to false.
  • Remove Python extension.
  • Restart VSCode.
  • Ctrl-Shift-P, "install from VSIX"
  • Install extension downloaded from releases page
  • Restart VSCode.

Thank you for checking that it works with 2020.3.71113 @jianboy, I will mark this as a regression.

@e-c-d Please give 2020.3.71113 a try and see if it works for you too. Sorry I misread the previous version as 2020.6.71113. Thank you for checking that the previous release of the extension works!

For both of you:

  • How do you create your conda virtual environments?
  • If you have multiple Python installs, does it happen only with python 3.6?
  • Does it happen if you use the Microsoft Python Language Server instead of Jedi?

Notes

Related issues

Might be related to our Jedi upgrade to 0.17.1: https://github.com/Microsoft/vscode-python/issues/12486
But then we updated to 0.17.2: https://github.com/microsoft/vscode-python/pull/13037

Downgrading

Another way to downgrade without having to download the extension VSIX manually can be done by following the prompts from "Extensions: Install Specific Version of Extension..." in the command palette:

image

Or you can open the extensions side bar, click on the settings for the Python extension and pick "Install Another Version...":

https://user-images.githubusercontent.com/51720070/80000627-39dacc00-8472-11ea-9755-ac7ba0acbb70.gif

From @karthiknadig:

0.17.2 is not in the stable release. So we need to repro it with stable. Then make sure that 0.17.2 fixes it. If not this is likely a bug on Jedi. And we revert to 0.17.0

FYI if people want to have IntelliSense with the latest release of the extension while we try to figure out the cause of the issue, you can try out https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance which is our new language server.

  • How do you create your conda virtual environments?

By cloning the base environment, conda create --name your-name --clone base.

  • If you have multiple Python installs, does it happen only with python 3.6?
  • Does it happen if you use the Microsoft Python Language Server instead of Jedi?

I only have the one Python install. This is a high security environment, so bringing in additional python versions is strongly discouraged. I tried using the MS Python Language Server, but it fails to download with a TLS error. Again, because it's a high security environment so we have one of those annoying man-in-the-middle firewalls that require you to install a custom root certificate. I haven't looked hard enough into how to install a custom root certificate into the VSCode certificate store.

Another way to downgrade without having to download the extension VSIX manually can be done by following the prompts from "Extensions: Install Specific Version of Extension..." in the command palette:

I tried that initially, but for some reason the list wouldn't load. Again, I'd blame the firewall.

bringing in additional python versions is strongly discouraged

Fair enough 馃檪

we have one of those annoying man-in-the-middle firewalls that require you to install a custom root certificate. I haven't looked hard enough into how to install a custom root certificate into the VSCode certificate store.

Would setting the http.proxyStrictSSL setting to false (or unchecking it in the User settings UI) work?

The general discussion for proxy support for VS Code extensions can be found here: https://github.com/microsoft/vscode/issues/12588

I tried that initially, but for some reason the list wouldn't load.

馃 If it's something that happens for all extensions it might be worth reporting it to VS Code. In any case, thank you for giving it a try!

@e-c-d While we figure out what is going on with this. Can you try Pylance? You can download it from the marketplace聽and install it alongside the core Python extension. Because our team's development efforts have shifted to support the new language server, we encourage you to try it out.

All python version has error. I think it has nothing to do with the python version. python plugin has problem I test version :

v2020.7.96456           error
v2020.7.94776           error
v2020.6.89148           ok
v2020.5.80290           ok
vv2020.3.71113         ok

I can not install another verison from vscode directly. So I had to download from github.
2020-07-28_065853

By using the dichotomy, I can already locate the version that caused the problem

BaiduHi_2020-7-28_6-54-52

@jianboy Can you try with this version and see if you get this error: https://pvsc.blob.core.windows.net/extension-builds/ms-python-insiders.vsix ?

@jianboy Can you try with this version and see if you get this error: https://pvsc.blob.core.windows.net/extension-builds/ms-python-insiders.vsix ?

I had download and try it. this insiders plugin has no error.

@jianboy Thank you for confirming.

This was an issue with jedi (0.17.1): https://github.com/davidhalter/jedi/issues/1627 , the fix is in jedi 0.17.2. Insiders version of the extension is already updated to use jedi 0.17.2.

Closing this issue, the fix will be available in the next stable release. Meanwhile for anyone running into this issue, please try insiders version of the extension: https://pvsc.blob.core.windows.net/extension-builds/ms-python-insiders.vsix

Fixed via #13037

Was this page helpful?
0 / 5 - 0 ratings