jupyter / jupyter/notebook

Path issues for interpreter after "save as"

Open
#5,103 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

When using "save as" and making a copy of a notebook in a new directory the kernel behind that notebook starts up in the working directory of the original notebook even between kernel resets.

To reproduce, from the command line:

mkdir tmp3
mkdir tmp4

Go into tmp3 and create a new notebook and save it. In the notebook run the command !pwd. Now choose File|save as, and enter tmp4/notebook.ipynb. Choose kernel|reset and clear output. You should now be in tmp4/notebook.ipynb with a cleanly reset kernel. run the cell with !pwd and notice that it still says tmp3 as your working directory.

Example video attached.

[2019-12-04 15-50-09.mp4.zip](https://github.com/jupyter/notebook/files/3923887/2019-12-04.15-50-09.mp4.zip)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue from the command line using tmp3 and tmp4, then follow the File|save as and kernel|reset entry points. Done means that after saving the notebook in tmp4 and resetting the kernel, running !pwd reports tmp4 rather than the original tmp3 directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.