jupyter / jupyter/notebook

"Run this cell and advance" does not work in combination with getpass / input

Open
#7,434 1 comment 0 reactions 0 assignees View on GitHub
bug status:Needs Discussion
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

## Description

Usually "Run this cell and advance" button is executing a cell and then, when finished, sets focus on the next cell. With this, continuously clicking "Run this cell and advance" will run the whole notebook (Like a manual run all) It turned out that when a call uses getpass / input, the cell is executed, but the advance is not working.

There is a popup window displayed which prevents focusing on the next cell:
Screenshot 2024-08-01 at 18 17 28

Notebook before version 7 allowed to submit the cell execution and then focused on the next cell.

## Reproduce

1. Create a new python notebook
2. add cell with the following code: `input('input: ')`
3. add second cell: `print('test')`
4. focus on the first cell and click ` "Run this cell and advance"` button
5. click ` "Run this cell and advance"` button one more time
6. the pop up window will be displayed and the next cell will not be submitted for execution

## Expected behavior

clicking ` "Run this cell and advance"` button after the executing a code cell with the input will submit next cell for execution.

There is an example how it worked in Notebook version before version 7:
Screenshot 2024-08-01 at 18 24 56

## Context

- Operating System and version: MacOS 14.3.1
- Browser and version: Version 126.0.6478.127 (Official Build) (arm64)

- Jupyter Notebook version: 7.2.1

Troubleshoot Output

Paste the output from running `jupyter troubleshoot` from the command line here.

You may want to sanitize the paths in the output.

Command Line Output

Paste the output from your command line running `jupyter notebook` here, use `--debug` if possible.

Browser Output

Paste the output from your browser Javascript console here, if applicable.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Jupyter Notebook 7.2.1 with two cells, using input('input: ') followed by print('test'), then click “Run this cell and advance” twice. Start by tracing the “Run this cell and advance” action when the input popup appears; done means the next cell is submitted for execution and receives focus as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.