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

Incorrect behavior when running .py files in the latest version #7369

Closed
kuri54 opened this issue Sep 1, 2021 · 3 comments
Closed

Incorrect behavior when running .py files in the latest version #7369

kuri54 opened this issue Sep 1, 2021 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster interactive-window Impacts interactive window

Comments

@kuri54
Copy link

kuri54 commented Sep 1, 2021

I updated VSCode since my research activities have come to an end. At that time, I also updated the extensions, but now I can't do what I used to be able to do.

Expected behaviour

extension versions
Pyhon: 2021.8.1105858891
Jupyter: 2021.8.1054968649

  1. Open the .py file
  2. Create a code indent with # %% and execute with shift + Enter
  3. The Interactive window appears and the code is executed
  4. Close the Interactive window
  5. Same behavior as 2.
  6. The code will be executed again.

old

Actual behavior

Extension versions
Pyhon: 2021.8.1159798656
Jupyter: 2021.8.1236758218

  • The code is not executed again.
  • The preview window appears instead of the Interactive window.
  • The message Direct kernel connection broken is displayed.

latest

The icon displayed in the Interactive window seems to have been changed.
Latest
スクリーンショット 2021-09-01 11 24 38

Old
スクリーンショット 2021-09-01 11 27 20

Logs

Jupyter

Error 2021-09-01 02:49:26: DataScience Error [Error: Direct kernel connection broken
    at E.getDisposedError (/home/kurita_10/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.1236758218/out/client/extension.js:37:840597)
    at f.P.handleCodeRequest (/home/kurita_10/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.1236758218/out/client/extension.js:90:205970)
    at /home/kurita_10/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.1236758218/out/client/extension.js:90:220305]

Steps to Reproduce

  1. Make sure your extensions (Python, Jupyter) are up to date.
  2. Start Docker from a dockerfile with a port output to JupyterNotebook.
  3. Connect from VSCode's remote feature.
  4. Open the .py file and run the code.
    (Do you need to provide a dockerfile?)

I don't know which extension has the problem this time, Python or Jupyter. (Please forgive me for posting on this issue without knowing.)
I tried using an older environment for either version, but that didn't solve the problem.
I don't think the Docker connection is the problem, what do you think?

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Sep 1, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Sep 1, 2021

This sounds like a timing issue with creation of the kernel in the new interactive window.

Can you include your entire 'jupyter' output log? It shows up here:

image

I'm going to enter a separate issue for the image next to the code. That's basically the execution count missing when code is collapsed.

@rchiodo rchiodo added bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window info-needed Issue requires more information from poster and removed needs-triage labels Sep 1, 2021
@kuri54
Copy link
Author

kuri54 commented Sep 2, 2021

Thanks for replying!

This sounds like a timing issue with the creation of the kernel in the new interactive window.

Yes, it does. This sounds like a timing issue with creation of the kernel in the new interactive window.

It shows up here:

I tried to respond to this reply, but for some reason I can't update to the latest version. I was able to do it yesterday, is there something wrong with it?

However, the log shown is as described above. I don't recall seeing any other error messages at the top of that log other than this one.I am sorry that I cannot reproduce this.

I'm going to enter a separate issue for the image next to the code. That's basically the execution count missing when code is collapsed.

Thanks for setting up a new issue.

@rchiodo
Copy link
Contributor

rchiodo commented Sep 23, 2021

Closing as not reproducible anymore.

@rchiodo rchiodo closed this as completed Sep 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2022
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 info-needed Issue requires more information from poster interactive-window Impacts interactive window
Projects
None yet
Development

No branches or pull requests

2 participants