ipykernel: AttributeError: 'NoneType' object has no attribute 'thread'
After running a jupyter notebook using jupyter nbconvert --to notebook --execute <notebook_name> --ExecutePreprocessor.timeout=15000 --inplace
, I get the following error:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python3.5/logging/__init__.py", line 1881, in shutdown
h.flush()
File "/home/kbuilder/.local/lib/python3.5/site-packages/absl/logging/__init__.py", line 882, in flush
self._current_handler.flush()
File "/home/kbuilder/.local/lib/python3.5/site-packages/absl/logging/__init__.py", line 776, in flush
self.stream.flush()
File "/tmpfs/src/tf_docs_env/lib/python3.5/site-packages/ipykernel/iostream.py", line 341, in flush
if self.pub_thread.thread.is_alive():
AttributeError: 'NoneType' object has no attribute 'thread'
This is the line where it fails: https://github.com/ipython/ipykernel/blob/master/ipykernel/iostream.py#L341
What can I do to fix it?
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 18
- Comments: 23 (1 by maintainers)
Commits related to this issue
- Pin ipykernel==5.1.1 in Dockerfiles The latest ipykernel has a bug, see https://github.com/ipython/ipykernel/issues/422. This change pins ipykernel in the Jupyter Dockerfiles to avoid the error when ... — committed to angerson/tensorflow by angerson 4 years ago
- Pin ipykernel==5.1.1 in Dockerfiles The latest ipykernel has a bug, see https://github.com/ipython/ipykernel/issues/422. This change pins ipykernel in the Jupyter Dockerfiles to avoid the error when ... — committed to angerson/tensorflow by angerson 4 years ago
kaggle notebook error …
Hi, I used to have this issue as well:
Downgrading ipykernel to 5.1.1 fixed it.
same error when running kernel on kaggle
I think this is already fixed in v6.13.0 (thanks to PR #899). Can anyone confirm?
I confirm also seeing the problem with ipykernel 5.3.4. Seemingly it returned 😦
I have a similar issue when running,
jupyter nbconvert --to html --execute notebooks.ipynb
on the following notebook:
Running the notebook from jupyter notebook does not produce an error. However, with nbconvert I get,
I have initially raised the issue here: https://github.com/tqdm/tqdm/issues/1092