Running notebook throwing errros

Hello All,

I am new to jupyter notebook and trying to run with give below errors. I also updated the configuration file and set the c.NotebookApp.ip = ‘’,

I 2022-02-22 19:47:53.084 LabApp] JupyterLab application directory is C:\Users\AlokKumar\anaconda3\share\jupyter\lab
[I 19:47:53.105 NotebookApp] Serving notebooks from local directory: C:\Users\AlokKumar
[I 19:47:53.106 NotebookApp] Jupyter Notebook 6.4.5 is running at:
[I 19:47:53.106 NotebookApp] http://localhost:8888/?token=fe7b6c3d9e8fe69cf5905289ca1ece65a8f55b5391698c43
[I 19:47:53.106 NotebookApp] or
[I 19:47:53.106 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 19:47:53.189 NotebookApp]

To access the notebook, open this file in a browser:
Or copy and paste one of these URLs:

[I 19:48:04.092 NotebookApp] Creating new notebook in
[I 19:48:11.762 NotebookApp] Kernel started: 978dbcff-a33c-42c0-b13b-12aebaf6a6e4, name: python3
Traceback (most recent call last):
File “C:\Users\AlokKumar\anaconda3\lib\”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\Users\AlokKumar\anaconda3\lib\”, line 87, in _run_code
exec(code, run_globals)
File “C:\Users\AlokKumar\anaconda3\lib\site-packages\”, line 16, in
File “C:\Users\AlokKumar\anaconda3\lib\site-packages\traitlets\config\”, line 846, in launch_instance
File “C:\Users\AlokKumar\anaconda3\lib\site-packages\ipykernel\”, line 665, in start
File “C:\Users\AlokKumar\anaconda3\lib\site-packages\ipykernel\”, line 178, in start
super(IPythonKernel, self).start()
File “C:\Users\AlokKumar\anaconda3\lib\site-packages\ipykernel\”, line 496, in start
asyncio.run_coroutine_threadsafe(self.poll_control_queue(), control_loop.asyncio_loop)
File “C:\Users\AlokKumar\anaconda3\lib\asyncio\”, line 933, in run_coroutine_threadsafe
File “C:\Users\AlokKumar\anaconda3\lib\asyncio\”, line 791, in call_soon_threadsafe
File “C:\Users\AlokKumar\anaconda3\lib\asyncio\”, line 510, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed
sys:1: RuntimeWarning: coroutine ‘Kernel.poll_control_queue’ was never awaited
[I 19:48:17.742 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
Exception in thread Thread-6:
Traceback (most recent call last):
File “C:\Users\AlokKumar\anaconda3\lib\”, line 973, in _bootstrap_inner
File “C:\Users\AlokKumar\anaconda3\lib\”, line 910, in run
self._target(*self._args, **self._kwargs)
File “C:\Users\AlokKumar\anaconda3\lib\site-packages\ipykernel\”, line 81, in _thread_main
File “C:\Users\AlokKumar\anaconda3\lib\site-packages\tornado\platform\”, line 199, in start
File “C:\Users\AlokKumar\anaconda3\lib\asyncio\”, line 596, in run_forever
File “C:\Users\AlokKumar\anaconda3\lib\asyncio\”, line 1854, in _run_once
event_list =
File “C:\Users\AlokKumar\anaconda3\lib\”, line 324, in select
r, w, _ = self._select(self._readers, self._writers, [], timeout)
File “C:\Users\AlokKumar\anaconda3\lib\”, line 315, in _select
r, w, x =, w, w, timeout)
OSError: [WinError 10038] An operation was attempted on something that is not a socket

Alok Beheria

Did you try the 9999 port when you started it like suggested here? That alone seems unlikely to help; however, maybe worth trying before uninstalling and reinstalling.

Did you only install using conda or have you been mixing and matching. That error came up when someone had been doing that here; however, may be completely unrelated if you have been using conda exclusively.

Bad installation was also the diagnosis here when similar issues were reported.

Thanks for your inputs , Yes, I also tried to set ports , but that too didn’t work. I installed Anaconda and launched jupyter python and after the installation , it worked fine for 1 day ,after that , it stopped working and throwing me errors which I shared here.


Now, I am seeing following errors now.

RuntimeError: Event loop is closed
[W 14:43:07.450 NotebookApp] Timeout waiting for kernel_info reply from c3dc16d7-2230-44a3-9ec6-8797b652ae47
[W 14:43:12.078 NotebookApp] Nudge: attempt 10 on kernel c3dc16d7-2230-44a3-9ec6-8797b652ae47
[W 14:43:17.185 NotebookApp] Nudge: attempt 20 on kernel c3dc16d7-2230-44a3-9ec6-8797b652ae47
[W 14:43:22.304 NotebookApp] Nudge: attempt 30 on kernel c3dc16d7-2230-44a3-9ec6-8797b652ae47
[W 14:43:27.408 NotebookApp] Nudge: attempt 40 on kernel c3dc16d7-2230-44a3-9ec6-8797b652ae47
[W 14:43:32.533 NotebookApp] Nudge: attempt 50 on kernel c3dc16d7-2230-44a3-9ec6-8797b652ae47
[W 14:43:37.677 NotebookApp] Nudge: attempt 60 on kernel c3dc16d7-2230-44a3-9ec6-8797b652ae47
[W 14:43:42.789 NotebookApp] Nudge: attempt 70 on kernel c3dc16d7-2230-44a3-9ec6-8797b652ae47
[W 14:43:47.922 NotebookApp] Nudge: attempt 80 on kernel c3dc16d7-2230-44a3-9ec6-8797b652ae47
[W 14:43:53.032 NotebookApp] Nudge: attempt 90 on kernel c3dc16d7-2230-44a3-9ec6-8797b652ae47
[W 14:43:58.160 NotebookApp] Nudge: attempt 100 on kernel c3dc16d7-2230-44a3-9ec6-8797b652ae47
[W 14:44:03.287 NotebookApp] Nudge: attempt 110 on kernel c3dc16d7-2230-44a3-9ec6-8797b652ae47
[I 14:44:07.263 NotebookApp] Saving file at /Untitled10.ipynb
[E 14:44:07.495 NotebookApp] Uncaught exception GET /api/kernels/c3dc16d7-2230-44a3-9ec6-8797b652ae47/channels?session_id=aeffd46225a544098dead09646d6142c (::1)
HTTPServerRequest(protocol=‘http’, host=‘localhost:8889’, method=‘GET’, uri=’/api/kernels/c3dc16d7-2230-44a3-9ec6-8797b652ae47/channels?session_id=aeffd46225a544098dead09646d6142c’, version=‘HTTP/1.1’, remote_ip=’::1’)
Traceback (most recent call last):
File “C:\Users\AlokKumar\anaconda3\lib\site-packages\tornado\”, line 956, in _accept_connection
await open_result
tornado.util.TimeoutError: Timeout
[W 14:44:08.525 NotebookApp] Replacing stale connection: c3dc16d7-2230-44a3-9ec6-8797b652ae47:aeffd46225a544098dead09646d6142c
[I 14:46:07.315 NotebookApp] Saving file at /Untitled10.ipynb

Just to update here and if anyone having same issue , I was able to fix this by running following.

pip uninstall pyzmq
pip install pyzmq==19.0.2
restart jupyter


1 Like

When looking at your first issue, I saw someone suggest about pyzmq (maybe it was this post that came up when searching error) and I almost included it. However, they actually had zmq errors in the traceback they posted. Closest you had was something about tornado, and so I deleted that suggestion. Also I was under the impression you were only using anaconda to install things and not mixing conda and pip. I guess I should just include that step in future advice.
Glad you got it resolved. Let’s hope it will keep working a day after this time, too.
Special thanks for posting what helped. Likely that will help someone in a similar situation.