Hi,
I have the issue that my notebooks do not connect to their kernel anymore. I can create new notebooks and open old ones, but the white "Kernel starting, please wait..." box never goes away and cells never execute.
Where should I look to find out, what could be the cause for that?
The setup is:
One note, that (since a long time) I had similar issues in Safari. It would show the orange "Connecting to kernel" box and then the red "Not Connected" one.
jupyter notebook --debug
[D 11:33:28.710 NotebookApp] Config changed:
[D 11:33:28.710 NotebookApp] {'NotebookApp': {'log_level': 10}}
[D 11:33:28.710 NotebookApp] Searching [u'/home/ludwig', '/home/ludwig/.jupyter', '/usr/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[D 11:33:28.710 NotebookApp] Attempting to load config file jupyter_config.py in path /etc/jupyter
[D 11:33:28.710 NotebookApp] Attempting to load config file jupyter_config.json in path /etc/jupyter
[D 11:33:28.710 NotebookApp] Attempting to load config file jupyter_config.py in path /usr/local/etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.json in path /usr/local/etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.py in path /usr/etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.json in path /usr/etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.py in path /home/ludwig/.jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.json in path /home/ludwig/.jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.py in path /home/ludwig
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_config.json in path /home/ludwig
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_notebook_config.py in path /etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_notebook_config.json in path /etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_notebook_config.py in path /usr/local/etc/jupyter
[D 11:33:28.711 NotebookApp] Attempting to load config file jupyter_notebook_config.json in path /usr/local/etc/jupyter
[D 11:33:28.712 NotebookApp] Attempting to load config file jupyter_notebook_config.py in path /usr/etc/jupyter
[D 11:33:28.712 NotebookApp] Attempting to load config file jupyter_notebook_config.json in path /usr/etc/jupyter
[D 11:33:28.712 NotebookApp] Attempting to load config file jupyter_notebook_config.py in path /home/ludwig/.jupyter
[D 11:33:28.712 NotebookApp] Attempting to load config file jupyter_notebook_config.json in path /home/ludwig/.jupyter
[D 11:33:28.712 NotebookApp] Loaded config file: /home/ludwig/.jupyter/jupyter_notebook_config.py
[D 11:33:28.713 NotebookApp] Config changed:
[D 11:33:28.713 NotebookApp] {'NotebookApp': {'open_browser': False, 'log_level': 10, 'ip': '*', 'certfile': u'/home/ludwig/.jupyter/mycert.pem', 'password': u'sha1:aa81bad79fba:a6f9f38ef7bf36cd3e25f5b38873196eed623604', 'keyfile': u'/home/ludwig/.jupyter/mycert.key', 'port': 9000}}
[D 11:33:28.713 NotebookApp] Attempting to load config file jupyter_notebook_config.py in path /home/ludwig
[D 11:33:28.713 NotebookApp] Attempting to load config file jupyter_notebook_config.json in path /home/ludwig
[I 11:33:28.718 NotebookApp] Writing notebook server cookie secret to /run/user/1002/jupyter/notebook_cookie_secret
[I 11:33:28.735 NotebookApp] The port 9000 is already in use, trying another random port.
[I 11:33:28.738 NotebookApp] Serving notebooks from local directory: /home/ludwig
[I 11:33:28.738 NotebookApp] 0 active kernels
[I 11:33:28.738 NotebookApp] The IPython Notebook is running at: https://[all ip addresses on your system]:9001/
[I 11:33:28.738 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 11:33:38.106 NotebookApp] 302 GET / (10.102.10.118) 0.85ms
[I 11:33:38.113 NotebookApp] 302 GET /tree (10.102.10.118) 1.28ms
[D 11:33:38.119 NotebookApp] Using contents: services/contents
[D 11:33:38.146 NotebookApp] 200 GET /login?next=%2Ftree (10.102.10.118) 28.03ms
[D 11:33:38.207 NotebookApp] 200 GET /static/components/jquery-ui/themes/smoothness/jquery-ui.min.css?v=9b2c8d3489227115310662a343fce11c (10.102.10.118) 2.52ms
[D 11:33:38.225 NotebookApp] 200 GET /static/style/style.min.css?v=726bda814675157da88304dabb766757 (10.102.10.118) 11.98ms
[D 11:33:38.242 NotebookApp] 200 GET /static/components/es6-promise/promise.min.js?v=f004a16cb856e0ff11781d01ec5ca8fe (10.102.10.118) 0.88ms
[D 11:33:38.246 NotebookApp] 200 GET /static/auth/css/override.css?v=795650e17afc9ef2f7cd6b630a0d5f80 (10.102.10.118) 0.80ms
[D 11:33:38.250 NotebookApp] 200 GET /custom/custom.css (10.102.10.118) 0.86ms
[D 11:33:38.253 NotebookApp] 200 GET /static/components/requirejs/require.js?v=2de44fdcc1fe5e939aa4ce80626b241d (10.102.10.118) 1.21ms
[D 11:33:38.262 NotebookApp] 200 GET /static/base/images/logo.png?v=7c4597ba713d804995e8f8dad448a397 (10.102.10.118) 0.85ms
[D 11:33:38.438 NotebookApp] 200 GET /static/auth/js/main.min.js?v=20160502113328 (10.102.10.118) 1.03ms
[I 11:33:42.932 NotebookApp] 302 POST /login?next=%2Ftree (10.102.10.118) 0.77ms
[D 11:33:42.938 NotebookApp] Using contents: services/contents
[D 11:33:42.953 NotebookApp] 200 GET /tree (10.102.10.118) 15.33ms
[D 11:33:42.995 NotebookApp] 304 GET /custom/custom.css (10.102.10.118) 0.79ms
[D 11:33:43.078 NotebookApp] 200 GET /static/tree/js/main.min.js?v=26c0ff61319c86280776dd7e281acc18 (10.102.10.118) 70.85ms
[D 11:33:43.342 NotebookApp] 200 GET /static/services/contents.js?v=20160502113328 (10.102.10.118) 0.75ms
[D 11:33:43.350 NotebookApp] 200 GET /custom/custom.js?v=20160502113328 (10.102.10.118) 0.67ms
[D 11:33:43.367 NotebookApp] 200 GET /api/config/tree?_=1462181632514 (10.102.10.118) 0.86ms
[D 11:33:43.368 NotebookApp] 200 GET /api/config/common?_=1462181632515 (10.102.10.118) 0.58ms
[D 11:33:43.376 NotebookApp] 200 GET /api/terminals?_=1462181632516 (10.102.10.118) 0.67ms
[D 11:33:43.380 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:43.380 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:43.381 NotebookApp] 200 GET /api/kernelspecs (10.102.10.118) 2.17ms
[D 11:33:43.383 NotebookApp] 200 GET /api/sessions?_=1462181632517 (10.102.10.118) 1.52ms
[D 11:33:43.385 NotebookApp] 200 GET /api/terminals?_=1462181632518 (10.102.10.118) 1.04ms
[D 11:33:43.387 NotebookApp] 200 GET /static/components/font-awesome/fonts/fontawesome-webfont.woff?v=4.2.0 (10.102.10.118) 0.90ms
[D 11:33:43.488 NotebookApp] 200 GET /api/contents?type=directory&_=1462181632519 (10.102.10.118) 4.50ms
[I 11:33:46.199 NotebookApp] Creating new notebook in
[D 11:33:46.200 NotebookApp] Saving /home/ludwig/Untitled2.ipynb
[D 11:33:46.213 NotebookApp] 201 POST /api/contents (10.102.10.118) 15.15ms
[D 11:33:46.263 NotebookApp] Using contents: services/contents
[D 11:33:46.285 NotebookApp] 200 GET /notebooks/Untitled2.ipynb?kernel_name=python2 (10.102.10.118) 22.54ms
[D 11:33:46.330 NotebookApp] 200 GET /static/components/MathJax/MathJax.js?config=TeX-AMS_HTML-full,Safe&delayStartupUntil=configured (10.102.10.118) 0.88ms
[D 11:33:46.331 NotebookApp] 200 GET /static/components/bootstrap-tour/build/css/bootstrap-tour.min.css?v=d0b3c2fce6056a2ddd5a4513762a94c4 (10.102.10.118) 0.48ms
[D 11:33:46.342 NotebookApp] 304 GET /custom/custom.css (10.102.10.118) 0.43ms
[D 11:33:46.343 NotebookApp] 200 GET /static/components/codemirror/lib/codemirror.css?v=549e7432c1e8e94d1a2e66d7be92a430 (10.102.10.118) 0.47ms
[D 11:33:46.344 NotebookApp] 200 GET /static/notebook/css/override.css?v=e6f18013b8771987812e992b38ec3318 (10.102.10.118) 0.47ms
[D 11:33:46.347 NotebookApp] 200 GET /static/components/text-encoding/lib/encoding.js?v=d5bb0fc9ffeff7d98a69bb83daa51052 (10.102.10.118) 0.69ms
[D 11:33:46.429 NotebookApp] 200 GET /static/components/MathJax/config/TeX-AMS_HTML-full.js?rev=2.5.3 (10.102.10.118) 11.26ms
[D 11:33:46.494 NotebookApp] 200 GET /static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d (10.102.10.118) 146.85ms
[D 11:33:46.532 NotebookApp] 200 GET /static/components/MathJax/config/Safe.js?rev=2.5.3 (10.102.10.118) 0.67ms
[D 11:33:46.764 NotebookApp] 200 GET /static/services/contents.js?v=20160502113328 (10.102.10.118) 0.66ms
[D 11:33:46.775 NotebookApp] 200 GET /custom/custom.js?v=20160502113328 (10.102.10.118) 0.64ms
[D 11:33:46.785 NotebookApp] 200 GET /api/config/notebook?_=1462181636003 (10.102.10.118) 0.61ms
[D 11:33:46.787 NotebookApp] 200 GET /api/config/common?_=1462181636004 (10.102.10.118) 0.53ms
[D 11:33:46.880 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:46.880 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:46.881 NotebookApp] 200 GET /api/kernelspecs (10.102.10.118) 1.59ms
[D 11:33:46.924 NotebookApp] 200 GET /api/contents/Untitled2.ipynb?type=notebook&_=1462181636005 (10.102.10.118) 10.90ms
[D 11:33:46.936 NotebookApp] 200 GET /nbextensions/widgets/notebook/js/extension.js?v=20160502113328 (10.102.10.118) 1.99ms
[D 11:33:46.938 NotebookApp] 200 GET /static/components/MathJax/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js?rev=2.5.3 (10.102.10.118) 1.32ms
[D 11:33:47.088 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:47.089 NotebookApp] Starting kernel: ['/usr/bin/python', '-m', 'ipykernel', '-f', u'/run/user/1002/jupyter/kernel-4f91c82c-06be-4f0c-ac94-b2a0cf5269e0.json']
[D 11:33:47.092 NotebookApp] Connecting to: tcp://127.0.0.1:49909
[I 11:33:47.093 NotebookApp] Kernel started: 4f91c82c-06be-4f0c-ac94-b2a0cf5269e0
[D 11:33:47.093 NotebookApp] Kernel args: {'kernel_name': u'python2', 'cwd': u'/home/ludwig'}
[D 11:33:47.094 NotebookApp] 201 POST /api/sessions (10.102.10.118) 17.39ms
[D 11:33:47.095 NotebookApp] Native kernel (python2) available from /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:47.096 NotebookApp] Serving kernel resource from: /usr/local/lib/python2.7/dist-packages/ipykernel/resources
[D 11:33:47.096 NotebookApp] 200 GET /kernelspecs/python2/logo-64x64.png (10.102.10.118) 1.90ms
[D 11:33:47.097 NotebookApp] 200 GET /api/contents/Untitled2.ipynb/checkpoints?_=1462181636006 (10.102.10.118) 0.73ms
[D 11:33:47.098 NotebookApp] 200 GET /static/components/MathJax/extensions/Safe.js?rev=2.5.3 (10.102.10.118) 0.52ms
[D 11:33:47.114 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/init.js?v=20160502113328 (10.102.10.118) 0.84ms
[D 11:33:47.115 NotebookApp] 200 GET /nbextensions/widgets/notebook/js/widgetarea.js?v=20160502113328 (10.102.10.118) 0.62ms
[D 11:33:47.184 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/manager.js?v=20160502113328 (10.102.10.118) 0.94ms
[D 11:33:47.186 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_link.js?v=20160502113328 (10.102.10.118) 0.61ms
[D 11:33:47.187 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget.js?v=20160502113328 (10.102.10.118) 0.70ms
[D 11:33:47.188 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_bool.js?v=20160502113328 (10.102.10.118) 0.57ms
[D 11:33:47.194 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_button.js?v=20160502113328 (10.102.10.118) 0.56ms
[D 11:33:47.195 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_box.js?v=20160502113328 (10.102.10.118) 0.52ms
[D 11:33:47.200 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_float.js?v=20160502113328 (10.102.10.118) 0.55ms
[D 11:33:47.201 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_image.js?v=20160502113328 (10.102.10.118) 0.57ms
[D 11:33:47.202 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_int.js?v=20160502113328 (10.102.10.118) 0.65ms
[D 11:33:47.203 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_color.js?v=20160502113328 (10.102.10.118) 0.56ms
[D 11:33:47.210 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_output.js?v=20160502113328 (10.102.10.118) 0.81ms
[D 11:33:47.212 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_selection.js?v=20160502113328 (10.102.10.118) 0.76ms
[D 11:33:47.219 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_selectioncontainer.js?v=20160502113328 (10.102.10.118) 0.55ms
[D 11:33:47.220 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_string.js?v=20160502113328 (10.102.10.118) 0.55ms
[D 11:33:47.259 NotebookApp] Initializing websocket connection /api/kernels/4f91c82c-06be-4f0c-ac94-b2a0cf5269e0/channels
[D 11:33:47.261 NotebookApp] Requesting kernel info from 4f91c82c-06be-4f0c-ac94-b2a0cf5269e0
[D 11:33:47.261 NotebookApp] Connecting to: tcp://127.0.0.1:55535
[D 11:33:47.263 NotebookApp] 200 GET /static/components/backbone/backbone-min.js?v=20160502113328 (10.102.10.118) 0.64ms
[D 11:33:47.419 NotebookApp] Received kernel info: {u'language_info': {u'mimetype': u'text/x-python', u'nbconvert_exporter': u'python', u'name': u'python', u'pygments_lexer': u'ipython2', u'version': u'2.7.6', u'file_extension': u'.py', u'codemirror_mode': {u'version': 2, u'name': u'ipython'}}, u'implementation': u'ipython', u'implementation_version': u'4.0.0', u'protocol_version': u'5.0', u'banner': u'Python 2.7.6 (default, Jun 22 2015, 17:58:13) \nType "copyright", "credits" or "license" for more information.\n\nIPython 4.0.0 -- An enhanced Interactive Python.\n? -> Introduction and overview of IPython\'s features.\n%quickref -> Quick reference.\nhelp -> Python\'s own help system.\nobject? -> Details about \'object\', use \'object??\' for extra details.\n%guiref -> A brief reference about the graphical user interface.\n', u'help_links': [{u'url': u'http://docs.python.org/2.7', u'text': u'Python'}, {u'url': u'http://ipython.org/documentation.html', u'text': u'IPython'}, {u'url': u'http://docs.scipy.org/doc/numpy/reference/', u'text': u'NumPy'}, {u'url': u'http://docs.scipy.org/doc/scipy/reference/', u'text': u'SciPy'}, {u'url': u'http://matplotlib.org/contents.html', u'text': u'Matplotlib'}, {u'url': u'http://docs.sympy.org/latest/index.html', u'text': u'SymPy'}, {u'url': u'http://pandas.pydata.org/pandas-docs/stable/', u'text': u'pandas'}]}
[D 11:33:47.419 NotebookApp] Opening websocket /api/kernels/4f91c82c-06be-4f0c-ac94-b2a0cf5269e0/channels
[D 11:33:47.420 NotebookApp] Connecting to: tcp://127.0.0.1:55535
[D 11:33:47.420 NotebookApp] Connecting to: tcp://127.0.0.1:37252
[D 11:33:47.420 NotebookApp] Connecting to: tcp://127.0.0.1:48695
[D 11:33:47.504 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_controller.js?v=20160502113328 (10.102.10.118) 1.60ms
[D 11:33:47.514 NotebookApp] 200 GET /nbextensions/widgets/widgets/css/widgets.min.css (10.102.10.118) 0.69ms
I just tried and it works flawless in Firefox 46.0 馃槙
Was Chrome just updated? Another Chrome user reported something similar at almost exactly the same time, #1414.
I used this method here http://superuser.com/questions/408570/how-can-i-tell-when-the-last-time-chrome-updated and it looks like it was last updated last Wednesday (27.04.11:23PM).
Fun fact, works in chrome incognito mode, but does NOT work in "normal" chrome with cache for that page disabled.
I really dont get how that's even possible.
Get a bunch of this in chrome console:
Kernel: kernel_reconnecting (2a1d29de-d1b6-40a7-b7ed-a3aff5e0aab7)
kernel.js:453 Starting WebSockets: ws://127.0.0.1:8888/api/kernels/2a1d29de-d1b6-40a7-b7ed-a3aff5e0aab7
WebSocket connection to 'ws://127.0.0.1:8888/api/kernels/2a1d29de-d1b6-40a7-b7ed-a3aff5e0aab7/channels?session_id=18A9C766F0144F6D832696AA233FA876' failed: Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received
kernel.js:100 Kernel: kernel_disconnected (2a1d29de-d1b6-40a7-b7ed-a3aff5e0aab7)
@takluyver The dev version is working with Chrome version referenced and Python 3. Will drop down to the latest stable and see what happens. Update: It seems to work with notebook v4.2 on OS X 10.11.4 with Python 3.
@andaag @mmcdan @shackenberg What notebook release version are you currently using?
Same problem here, restarted a kernel 15min ago and nothing happened. Everything is stuck at "Kernel starting, please wait..." now. (Win 8.1, Chrome 49.0.2623.112, notebook 4.2.0)
[edit1] updated Chrome to 50.0.2661.94, same problem.
[edit2] IE11 works, though
@NasenSpray Thanks for the report and version details.
This is probably due to this bug with the uBlock extension blocking WebSockets: https://github.com/gorhill/uBlock/issues/1604
@RobbieClarken: thx, deactivating uBlock (1.7.0) resolved it for me
Thanks for the detective work @RobbieClarken :-)
uBlock 1.7.2 fixes the issue for me.
Can confirm 1.7.2 fixes this issue.
Thanks to @RobbieClarken's tip. I'm going to close this. Please feel free to reopen if there are additional issues.
Confirm this issue on Chrome (51.0.2704.103) but not Safari
FWIW even firefox with no adblock whatsoever did not resolve the issue for me.
To solve the issue, I just re-started Chrome
Same as @ryantuck, clean installation no plugins at all yet kernels don't start. Jupyter seems to work flawless with Safari
@rocreguant What is the Firefox version that you are using? Operating system? Are you using the recent release 5.0.0. If not please try upgrading. Thanks!
@gnestor @takluyver Do you want to reopen this re: Firefox?
@willingc I'm using Firefox 52.0.2 (64-bit)
on macOS Sierra 10.12.3
PS: I used firefox several months before this and to my knowledge no updates have been made.
I don't have any good ideas how to debug it at the moment, though.
@rocreguant I think you may have a configuration issue on your system. Firefox is working for me using Python and R with Firefox 52.0.2 (64-bit) and Sierra 10.12.4 using Notebook 5.0.0 (which was released a few days ago). I've just tried it with a conda install and a pip install.
Perhaps good next steps would be:
jupyter notebook troubleshootjupyter notebook --debugI just Quit chrome & re-launched, the issue got solved.
It probably arises if you force-quit the browser, or restarted your laptop(in my case, Macbook pro).
I understand this is an old issue, had this for last two days, and restarting chrome resolved it.
I'm going to close this as it appears to be a browser/environment-related issue. We can re-open if it appears to be notebook-related in the future.
I disabled the adblock extension in Chrome and that fixed the problem for me
I just had this issue, and neither the browser changing helped me nor blocking any extension. I had to completely uninstall anaconda and re-install it. Now it's working completely fine.
Updating Jupyter Notebook, resolved the issue for me.
But don't update it using Anaconda Navigator interface.
Do it like this
pip install -U jupyter
Hey guys i have this problem as well in my jupyter notebook after updating all my pip package and conda, before updating i think it works fine a months ago.
This is the application launch error that anaconda navigator gave me:
```[I 23:25:41.176 NotebookApp] The port 8888 is already in use, trying another port.
[I 23:25:41.177 NotebookApp] The port 8889 is already in use, trying another port.
[I 23:25:41.212 NotebookApp] JupyterLab extension loaded from D:\anacondalib\site-packagesjupyterlab
[I 23:25:41.212 NotebookApp] JupyterLab application directory is D:\anaconda\sharejupyterlab
[I 23:25:41.213 NotebookApp] Serving notebooks from local directory: C:\Users\decade
[I 23:25:41.213 NotebookApp] The Jupyter Notebook is running at:
[I 23:25:41.213 NotebookApp] http://localhost:8890/?token=6594a258c7517ef549967bd34cb856f97b5987397c7852cb
[I 23:25:41.215 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 23:25:41.333 NotebookApp]
To access the notebook, open this file in a browser:
file:///C:/Users/decade/AppData/Roaming/jupyter/runtime/nbserver-15008-open.html
Or copy and paste one of these URLs:
http://localhost:8890/?token=6594a258c7517ef549967bd34cb856f97b5987397c7852cb
[I 23:25:46.487 NotebookApp] Creating new notebook in
[I 23:25:47.571 NotebookApp] Kernel started: 3d40a23d-bcd7-434c-b9c2-60457579ab24
Traceback (most recent call last):
File "D:\anacondalib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "D:\anacondalib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\anacondalib\site-packages\ipykernel_launcher.py", line 16, in
app.launch_new_instance()
File "D:\anacondalib\site-packages\traitlets\configapplication.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "D:\anacondalib\site-packages\traitlets\configapplication.py", line 87, in catch_config_error
return method(app, args, *kwargs)
File "D:\anacondalib\site-packages\ipykernelkernelapp.py", line 478, in initialize
self.init_kernel()
File "D:\anacondalib\site-packages\ipykernelkernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "D:\anacondalib\site-packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, *kwargs)
File "D:\anacondalib\site-packages\ipykernel\ipkernel.py", line 67, in __init__
kernel = self,
File "D:\anacondalib\site-packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, *kwargs)
File "D:\anacondalib\site-packages\IPython\coreinteractiveshell.py", line 679, in __init__
self.init_magics()
File "D:\anacondalib\site-packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "D:\anacondalib\site-packages\IPython\coreinteractiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "D:\anacondalib\site-packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "D:\anacondalib\site-packages\IPython\core\magics\osm.py", line 52, in __init__
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "D:\anacondalib\re.py", line 234, in compile
return _compile(pattern, flags)
File "D:\anacondalib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "D:\anacondalib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "D:\anacondalib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "D:\anacondalib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "D:\anacondalib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "D:\anacondalib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "D:\anacondalib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "D:\anacondalib\sre_parse.py", line 402, in _escape
raise source.error("bad escape %s" % escape, len(escape))
re.error: bad escape j at position 52
[I 23:25:50.564 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
File "D:\anacondalib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "D:\anacondalib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\anacondalib\site-packages\ipykernel_launcher.py", line 16, in
app.launch_new_instance()
File "D:\anacondalib\site-packages\traitlets\configapplication.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "D:\anacondalib\site-packages\traitlets\configapplication.py", line 87, in catch_config_error
return method(app, *args, *kwargs)
File "D:\anacondalib\site-packages\ipykernelkernelapp.py", line 478, in initialize
self.init_kernel()
File "D:\anacondalib\site-packages\ipykernelkernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "D:\anacondalib\site-packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, *kwargs)
File "D:\anacondalib\site-packages\ipykernel\ipkernel.py", line 67, in __init__
kernel = self,
File "D:\anacondalib\site-packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, *kwargs)
File "D:\anacondalib\site-packages\IPython\coreinteractiveshell.py", line 679, in __init__
self.init_magics()
File "D:\anacondalib\site-packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "D:\anacondalib\site-packages\IPython\coreinteractiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "D:\anacondalib\site-packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "D:\anacondalib\site-packages\IPython\core\magics\osm.py", line 52, in __init__
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "D:\anacondalib\re.py", line 234, in compile
return _compile(pattern, flags)
File "D:\anacondalib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "D:\anacondalib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "D:\anacondalib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "D:\anacondalib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "D:\anacondalib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "D:\anacondalib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "D:\anacondalib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "D:\anacondalib\sre_parse.py", line 402, in _escape
raise source.error("bad escape %s" % escape, len(escape))
re.error: bad escape j at position 52
[I 23:25:53.599 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
Traceback (most recent call last):
File "D:\anacondalib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "D:\anacondalib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\anacondalib\site-packages\ipykernel_launcher.py", line 16, in
app.launch_new_instance()
File "D:\anacondalib\site-packages\traitlets\configapplication.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "D:\anacondalib\site-packages\traitlets\configapplication.py", line 87, in catch_config_error
return method(app, *args, *kwargs)
File "D:\anacondalib\site-packages\ipykernelkernelapp.py", line 478, in initialize
self.init_kernel()
File "D:\anacondalib\site-packages\ipykernelkernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "D:\anacondalib\site-packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, *kwargs)
File "D:\anacondalib\site-packages\ipykernel\ipkernel.py", line 67, in __init__
kernel = self,
File "D:\anacondalib\site-packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, *kwargs)
File "D:\anacondalib\site-packages\IPython\coreinteractiveshell.py", line 679, in __init__
self.init_magics()
File "D:\anacondalib\site-packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "D:\anacondalib\site-packages\IPython\coreinteractiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "D:\anacondalib\site-packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "D:\anacondalib\site-packages\IPython\core\magics\osm.py", line 52, in __init__
self.execre = re.compile(r'(.*).(%s)$' % winext,re.IGNORECASE)
File "D:\anacondalib\re.py", line 234, in compile
return _compile(pattern, flags)
File "D:\anacondalib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "D:\anacondalib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "D:\anacondalib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "D:\anacondalib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "D:\anacondalib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "D:\anacondalib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "D:\anacondalib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "D:\anacondalib\sre_parse.py", line 402, in _escape
raise source.error("bad escape %s" % escape, len(escape))
re.error: bad escape j at position 52
```
thing i tried:
-ipykernel to 5.0
-uninstall python
-reinstalling anaconda
-blocking adblock
-using other web browser.
Any advice would be greatly appreciated
OS used : windows 10
antivirus : windows defender
I hope it's not too late. I had similar problem with you and this link helped me: https://github.com/jupyter/notebook/issues/2664#issuecomment-468954423
Upgrading to Notebook 5.7.5 should resolve the issue. https://github.com/jupyter/notebook/issues/2664#issuecomment-471000029
This just happened to me and I have no idea why. I'm using IJulia from the REPL.
Macintosh iMac OS 10.14.5
How do I fix or diagnose this?
my "solution" is bouncing jupyter. sometimes more than once, until i see the message
Replacing stale connection..
and then it works.
3. jupyter notebook troubleshoot
hey mine have problem
here is output of 'jupyter notebook troubleshoot'
[C 15:17:46.170 NotebookApp] No such file or directory: C:\Users\Rajsa\troubleshoot
Hi @raj9650sahni - the troubleshoot option applies to the jupyter command itself. Try jupyter troubleshoot and you should see output consisting of applicable paths and package installations.
The reason you got the error with jupyter notebook troubleshoot is because notebook wants to treat the argument as a notebook file or directory and it was neither.
Tried restarting Docker container, no go!
Restarting firefox fixed the issue!
When I had the issue I realised that I started the Jupyter session in different conda environment and opened the notebook in entirely different conda environment kernel
Most helpful comment
This is probably due to this bug with the uBlock extension blocking WebSockets: https://github.com/gorhill/uBlock/issues/1604