-
Notifications
You must be signed in to change notification settings - Fork 294
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
Jupyter Notebook cells running out of order #2316
Comments
Hi @alanhett, thank you for reporting your issue. I'm trying to reproduce it but can't get it. When pressing 'run all cells', the cell execution count does change to a '*' in all cells to indicate that they are running. But they do execute in order for me. Are you getting errors like 'pandas is not defined'? |
Correct, let me re-run the specific file I was having issues with and see if I can provide more specifics. |
@DavidKutu got it to reproduce. Here are the specifics:
Correct me if I'm wrong, but if I click run all cells, it shouldn't matter what cell I have selected right? They should all run in order, top-to-bottom? Note that this is an intermittent problem. It happens maybe 1 out of 10 times that I run it. I had to restart the kernel several times to get it to reproduce. |
@DavidKutu just confirming I also tried this selecting the first cell, and clicking the "run cell and below" button and still got the out-of-order execution on occasion. So I don't think it matters what I do, things are running out of order. |
@alanhett thanks for the steps. |
@alanhett Thank you for the steps! We'll look into it. |
I confirm that some cells get skipped, while some are executed out of order. I just started using VS Code yesterday. Whether I use an Anaconda kernel or a kernel installed in WSL, the issue is the same. Note that using the same Anaconda kernel in the Anaconda-bundled Notebook works as expected. |
I have had this issue as well using |
The expected behavior for "Shift + Enter" is to run the current cell. How can it run all cells? |
If you hold |
@alanhett I have the same issue as well. I am glad I am not the only one that has had this problem. |
Validated. With a few different files Notebook editor + interactive window. Tried different UI sets (run all cells, run cells below, fast shift-enters) and was not able to repro out of order exection. |
Steps to cause the bug to occur
Actual behavior
Occasionally, cells run out of order, or they are not waiting for execution to finish before the next cell is run. For example, I'll run
import pandas as pd
and the next cell will run beforepd
is set.Expected behavior
Cells should run in the correct order. Execution on one cell should complete before the next cell starts.
This does not occur in Jupyter Lab when I run it in a browser window. Only in VS Code.
The text was updated successfully, but these errors were encountered: