jupyter / jupyter/notebook

Why does Jupyter notebook stop executing after a line is re-run after an error?

Open
#3,084 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

For the **Encoding categorical data** section, the first time I ran it, I got an error because I didn't have sklearn installed. After I installed it and re-run, I got **In [*].** No matter how many times I run it, it's not executing. Basically, after an error is made, all lines can't be executed again.
![image](https://user-images.githubusercontent.com/33768560/33248202-b9eb0b10-d2f1-11e7-96de-1362b91b13ff.png)

One thing I found out is that this Jupyter Notebook is under tensorflow environment. This is what I did from the beginning:
1. Create tensorflow environment, then install tensorflow
2. Import the libraries, it didn't work because matplotlib not installed
3. Then install matplotlib

From my own troubleshooting, this is where the problem begins. So I tried to uninstall matplotlib, it's fine again as shown.![image](https://user-images.githubusercontent.com/33768560/33250207-38869a24-d2fd-11e7-8a83-bcca595288a9.png)
Now even there's an error, I can still re-run it and the execution is fine because the number will be updated instead of [*].

Then the problem arises again because if I keep running it, it will turn into [*] again after maybe 3rd or 4th times. The thing is if I do the same thing with Jupyter notebook under root environment(no tensorflow installed, matplotlib is installed), I can keep re-running it for as many times and there's no problem(the number will be changed). So what's wrong with it?

Contributor guide

Open the contributing guide

Research direction

Begin with the Encoding categorical data section and reproduce repeated execution after the initial missing-dependency errors. Compare the tensorflow and root environments described in the report, and document the dependency and environment conditions that cause execution to remain at In [*] along with a verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, matplotlib, scikit-learn, tensorflow
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.