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

Run Selection/Line in Python Terminal gives unexpected indent #2930

Closed
WayOfKings opened this issue Oct 17, 2018 · 9 comments
Closed

Run Selection/Line in Python Terminal gives unexpected indent #2930

WayOfKings opened this issue Oct 17, 2018 · 9 comments

Comments

@WayOfKings
Copy link

WayOfKings commented Oct 17, 2018

Environment data

  • VS Code version: 1.28.1 (user setup)
  • Extension version (available under the Extensions sidebar): 2018.9.0
  • OS and version: Windows 7 Professional
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda 3-5.3.0

Actual behavior

1
2

Expected behavior

The selection runs and outputs:
2
4

Had a colleague try it in Jupyter Notebook and IDLE and it works.
Also, works fine if in VSCode I run Debug (F5), which runs the whole .py file.
3

Steps to reproduce:

Make a new .py file, enter in lines 11 through 15 in the first picture above.

  • select the list assignment and (shift + enter) to run the selection in python terminal
  • then select the 3 lines of the loop and (shift + enter)

I have tried various indentations and adding new lines between various lines but still have this issue.

##Logs
From terminal...

4

Feels similar to issue 259, but if resolved, why is this still happening?

@ew2319
Copy link

ew2319 commented Oct 17, 2018

I have this same issue. It started after updating to VSCode to version 1.28.1

@brettcannon
Copy link
Member

Duplicate of #2857

@brettcannon brettcannon marked this as a duplicate of #2857 Oct 18, 2018
@jsarneja
Copy link

jsarneja commented Oct 19, 2018

Hi, I am experiencing the same problem that @WayOfKings had experienced. When I run the code then the console is stuck at 3 dots until I manually hit enter in the console. What's the remedy here, please?

image

This is after my python extension is updated to 2018.9.1

@DonJayamanne
Copy link

@jsarneja Dup of #169

@jsarneja
Copy link

Hi @DonJayamanne - Thanks but I cannot see any suggestion to solve this problem in that thread. There was a talk of adding newline characters bu nothing after that

@ChandanVerma
Copy link

yes after the updates... the issue has been solved.
Install instructions and fix can be downloaded here
https://github.com/Microsoft/vscode-python/blob/master/CONTRIBUTING.md#development-build

@jsarneja
Copy link

According to the thread #2857 final update was that a new release of Python extension (2018.9.1) now contains this fix so I assumed we dont need to install the VSIX file. Anyhow, I have installed VSIX file now from the link you shared. But the same problem persists. What to do here?

@jsarneja
Copy link

I have created a new issue #2962 for this. You may close this and answer there directly

@DonJayamanne
Copy link

@jsarneja The issue #169 describes exactly what you have mentioned.
It is still opened, meaning it has not been fixed.
This fix in 2018.9.1 was not meant to fix the trailing line issue.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants