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

Python Interactive: empty line(s) followed by markdown cell + code doesn't execute code in first cell #15675

Open
Mo-Gul opened this issue May 8, 2024 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window

Comments

@Mo-Gul
Copy link

Mo-Gul commented May 8, 2024

Environment data

  • VS Code version: 1.89.0
  • Jupyter Extension version: v2024.4.0
  • Python Extension version: v2024.6.0
  • OS and version: Win10 version 22H2
  • Python and/or Anaconda version: Python 3.12.2
  • Type of virtual environment used: N/A
  • Jupyter server running: N/A

Expected behaviour

First cell executes code (as well).

Actual behaviour

Only the markdown content is shown.

Steps to reproduce:

  1. create a python file (e.g. test.py)
  2. add the code below to the file
  3. in case the first line is not empty (because it is not rendered as given) but the comment cell, please add an empty (first) line
  4. run "Run Above" in the second cell
# %% [markdown]
# test
x = 1

# %%

Comparison MNWE and MWE

Below you find the output with and without the first line being empty. With the first empty line you don't see the green checkmark (line) that the code part (i.e. x = 1) was executed while without the first empty line the green checkmark (line) is present.

screenshot of code + output with first empty line

result with first empty line

screenshot of code + output without first empty line

result without first empty line

@Mo-Gul Mo-Gul added the bug Issue identified by VS Code Team member as probable bug label May 8, 2024
@amunger amunger added the interactive-window Impacts interactive window label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window
Projects
None yet
Development

No branches or pull requests

3 participants