Skip to content

VS Code is not executing code anymore either with Shift+Enter or Right click run code but adds new line #4595

@LargoTerranova

Description

@LargoTerranova

Environment data

  • VS Code version: 1.31.1
  • Extension version (available under the Extensions sidebar): XXX
  • OS and version: Win 10
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.1 64-bit ('base': conda)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): NA
  • Relevant/affected Python packages and their versions: I have codeRunner and PYthon installed to run python code

Expected behaviour

This morning a message from microsoft popt up in the lower right corner of VSCode. It said something about ultimate new experience and I clicked it without thinking. Afterwards I noticed that I could not run code eanmore. Usually I type > python< at the terminal promt to open python. Then I import the packages and run my code by putting the cursor at the end and hitting SHIFT+ENTER

Actual behaviour

When I mark a couple of lines and I hit SHIFT+ENTER behind a codeblock a new line is added but the code is not executed. When I mark the line and right click RUN CODE then I get the message below in Problems:

`[Running] python -u "c:\Users\userxyz\Google Drive\Python\tempCodeRunnerFile.py"
Traceback (most recent call last):
File "c:\Users\userxyz\Google Drive\Python\tempCodeRunnerFile.py", line 1, in
import seaborn as sns
ModuleNotFoundError: No module named 'seaborn'

[Done] exited with code=1 in 0.232 seconds`

[Done] exited with code=1 in 0.232 seconds

Even when I import the module manually by typing it in the Terminal the same thing happens. I know for sure that the packages are installed.

I also noticed that a strange file is created when I try to execute code called "tempCodeRunnerFile.py" I never observed this kind of behavior before. Google and the Documentation was no help.

Here are the settings for my keybindings, they seem to be fine:
28 02

Steps to reproduce:

I'm not sure how to provide them.

Logs

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

XXX

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)

XXX

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions