Skip to content

Run Line/Selection Not working #9480

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

Closed
Kingsley-James89 opened this issue Jan 9, 2020 · 6 comments
Closed

Run Line/Selection Not working #9480

Kingsley-James89 opened this issue Jan 9, 2020 · 6 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@Kingsley-James89
Copy link

Environment data

  • VS Code version: 1.41.1
  • Extension version (available under the Extensions sidebar): 15,020,608
  • OS and version: Windows 10 Windows_NT x64 10.0.17763
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda / Python 3.7.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): CONDA
  • Relevant/affected Python packages and their versions: none
  • Jedi or Language Server? : Jedi

Expected behaviour

Python initialises and executes line of code

Actual behaviour

terminal runs command but python does not start, text is enter into the terminal but nothing happens ">>>" does not appear

(PythonEnv) C:\Python Projects_Projects\Py_BrowserAutomation>conda run -n PythonEnv python
import os

Steps to reproduce:

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

  1. Pressing Shift + Enter to execute Line or selection

Logs

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

No Output

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-09 13:13:48: Get Conda File from interpreter, Class name = b, completed in 2ms, Arg 1: "C:\\Users\\user\\.conda\\envs\\PythonEnv\\python.exe", Arg 2: "PythonEnv", Return Value: undefined

@Kingsley-James89 Kingsley-James89 added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Jan 9, 2020
@Kingsley-James89
Copy link
Author

Couple of notes:
Running the Script through control shift enter works fine.

@IlyaOrson
Copy link

Python: Run Selection Line in Python Terminal also triggers this issue for me.

@CrimpCity
Copy link

CrimpCity commented Jan 9, 2020

I have the same issue. Additionally, I can't run line/selection in terminal or Python Interactive Window
VS Code version: 1.41
Version: 2020.1.57204
OS and version: Windows 10 Windows x64 version 1803
Python version (& distribution if applicable, e.g. Anaconda): Anaconda / Python 3.7.3
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): CONDA
Relevant/affected Python packages and their versions: none
Jedi or Language Server? : Jedi

EDIT:
I switched to the python extension version: 2019.10.41019 and added:
"terminal.integrated.inheritEnv": false
solved my issue but I needed to reload my code runner extension.

@Kingsley-James89
Copy link
Author

I can confirm that this works on

Name: Python
Id: ms-python.python
Description: Linting, Debugging (multi-threaded, remote), Intellisense, Jupyter Notebooks, code formatting, refactoring, unit tests, snippets, and more.
Version: 2019.11.50794
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.python

can also confirm the setting terminal.integrated.inheritEnv set to true / false does not fix my issue

@rchiodo
Copy link

rchiodo commented Jan 9, 2020

This is a dupe of #9439 which should be fixed shortly

@rchiodo rchiodo closed this as completed Jan 9, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jan 9, 2020
@huaji1992
Copy link

me too

@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

5 participants