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.

There are some problems of the 'conda run'

See original GitHub issue

Environment data

  • VS Code version: 1.41.1
  • Extension version (available under the Extensions sidebar): 2020.1.57204
  • OS and version: Windows_NT x64 10.0.18363
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.6 conda
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Relevant/affected Python packages and their versions: None
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977): Python Language Server

Expected behaviour

My code contains an input() statement

When I execute at the terminal, I should be able to wait for user input

Actual behaviour

Terminal error reporting

Steps to reproduce:

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

Input code like:

x = 5
y = input()
print(x,y)

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

(py37) D:\source\pystudy>C:/Users/BoulderH/Miniconda3/condabin/conda.bat run -n py37 python d:/source/pystudy/func.py
ERROR conda.cli.main_run:execute(30): Subprocess for 'conda run ['python', 'd:/source/pystudy/func.py']' command failed.  (See above for error)
Traceback (most recent call last):
  File "d:/source/pystudy/func.py", line 2, in <module>
    x = input()
EOFError: EOF when reading a line

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

[Extension Host] Info Python Extension: 2020-01-10 09:22:03: Cached data exists getEnvironmentVariables, d:\source\pystudy\func.py
2console.ts:137 [Extension Host] Info Python Extension: 2020-01-10 09:22:03: Cached data exists getEnvironmentVariables, <No Resource>
console.ts:137 [Extension Host] Info Python Extension: 2020-01-10 09:22:03: > ~\Miniconda3\condabin\conda.bat info --json
console.ts:137 [Extension Host] Info Python Extension: 2020-01-10 09:22:03: Get Conda environments, Class name = b, completed in 0ms, Arg 1: false, Return Value: [{"name":"base","path":"C:\\Users\\BoulderH\\Miniconda3"},{"name":"py37","path":"C:\\Users\\BoulderH\\Miniconda3\\envs\\py37"},{"name":"py38","path":"C:\\Users\\BoulderH\\Miniconda3\\envs\\py38"}]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
Diogo-Rossicommented, Jan 10, 2020

Seems the problem is clear now: It is an issue in conda run command, which wasn’t used before. vscode-python extension didn’t use conda run in previous version. It is an new feature from an update in the last few days Downgrading the extension may solve the problem. conda run command is not necessary, once the environment is activated in the previous command conda activate <ENV>

image

0reactions
kimadelinecommented, Jan 13, 2020

Duplicate of https://github.com/microsoft/vscode-python/issues/9441

Should be fixed in today’s release (2020.1.58038).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting — conda 22.11.1.post16+ce4e810c9 ...
Conda works by unpacking the packages in the pkgs directory and then hard-linking them to the environment. Sometimes these get corrupted, breaking all ......
Read more >
Troubleshooting - Anaconda Documentation
Navigator error on start up · Issues launching or initializing · PermissionError on macOS Catalina · Access denied error · Navigator buttons are...
Read more >
Common Conda Issues | MUSA 550
Part 1: Troubleshooting Steps for Most Issues. Update your conda version; Delete any existing environment; Create a fresh environment · Part 2: Common...
Read more >
anaconda - Conda activate not working? - Stack Overflow
Did you check your env folder? · use this in your cmd: activate <envname> · For others who are experiencing this problem, the...
Read more >
Efficient Way to Activate Conda in VSCode - Medium
On the top right corner, there is a button “Run Python File in Terminal”. ... If you have problem finding the conda virtual...
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