Skip to content

Keeping restarting kernel #249

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

Closed
eromoe opened this issue Mar 24, 2017 · 2 comments
Closed

Keeping restarting kernel #249

eromoe opened this issue Mar 24, 2017 · 2 comments

Comments

@eromoe
Copy link

eromoe commented Mar 24, 2017

I run jupyter in docker. It is fine ,but today I meet below error:

[I 01:07:02.193 NotebookApp] KernelRestarter: restarting kernel (4/5)
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 174, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.5/runpy.py", line 133, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/usr/local/lib/python3.5/dist-packages/ipykernel/__init__.py", line 2, in <module>
    from .connect import *
  File "/usr/local/lib/python3.5/dist-packages/ipykernel/connect.py", line 10, in <module>
    from subprocess import Popen, PIPE
  File "/usr/lib/python3.5/subprocess.py", line 441, in <module>
    import threading
  File "/usr/lib/python3.5/threading.py", line 7, in <module>
    from traceback import format_exc as _format_exc
  File "/usr/lib/python3.5/traceback.py", line 5, in <module>
    import linecache
  File "/usr/lib/python3.5/linecache.py", line 11, in <module>
    import tokenize
  File "/data/corpus/tokenize.py", line 12, in <module>
    import jieba
  File "/usr/local/lib/python3.5/dist-packages/jieba/__init__.py", line 9, in <module>
    import logging
  File "/usr/lib/python3.5/logging/__init__.py", line 206, in <module>
    _lock = threading.RLock()
AttributeError: module 'threading' has no attribute 'RLock'

Restart kernel not work, restart docker containner not work.

Then I build a fresh docker image, still error, something like:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 174, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.5/runpy.py", line 133, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/usr/local/lib/python3.5/dist-packages/ipykernel/__init__.py", line 2, in <module>
    from .connect import *
  File "/usr/local/lib/python3.5/dist-packages/ipykernel/connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
  File "/usr/local/lib/python3.5/dist-packages/IPython/__init__.py", line 48, in <module>
    from .core.application import Application
  File "/usr/local/lib/python3.5/dist-packages/IPython/core/application.py", line 25, in <module>
    from IPython.core import release, crashhandler
  File "/usr/local/lib/python3.5/dist-packages/IPython/core/crashhandler.py", line 28, in <module>
    from IPython.core import ultratb
  File "/usr/local/lib/python3.5/dist-packages/IPython/core/ultratb.py", line 111, in <module>
    generate_tokens = tokenize.tokenize
AttributeError: module 'tokenize' has no attribute 'tokenize'
@eromoe
Copy link
Author

eromoe commented Mar 24, 2017

OK, I think I found the problem. There is a build-in lib named tokenize which , and I have a tokenize.py file under current folder.

@eromoe eromoe closed this as completed Mar 24, 2017
@binary10
Copy link

binary10 commented May 18, 2019

Exception ignored in: <module 'threading' from '/Users/user1/Downloads/threading.py'>
AttributeError: module 'threading' has no attribute '_shutdown'

I installed Jupyter through pip and the kernel is not starting. Retries all end in failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants