title: Jupyter Notebook : ERROR:asyncio:Exception in callback
body: <p>I am using Jupyter Notebook in Windows 10 with Python 3.9.6. I have installed Jupyter Notebook with this command <code>pip install jupyter</code> and run it with this command <code>jupyter notebook</code>. So after starting the notebook, in the terminal I see some errors also but so far I don't seem to see any impact because of it. But still wanted to check, what that error actually indicates and is there a way to fix it?</p>
  <pre><code>[I 18:25:02.479 NotebookApp] Serving notebooks from local directory: C:\Users\maryo\Desktop\python\jpnb
  [I 18:25:02.479 NotebookApp] Jupyter Notebook 6.4.3 is running at:
  [I 18:25:02.479 NotebookApp] http://localhost:8888/?token=dfd2534b828985fcc116e9c400fd31381e9c8f19034e39d3
  [I 18:25:02.479 NotebookApp]  or http://127.0.0.1:8888/?token=dfd2534b828985fcc116e9c400fd31381e9c8f19034e39d3
  [I 18:25:02.479 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
  [C 18:25:02.508 NotebookApp]
  
      To access the notebook, open this file in a browser:
          file:///C:/Users/maryo/AppData/Roaming/jupyter/runtime/nbserver-17088-open.html
      Or copy and paste one of these URLs:
          http://localhost:8888/?token=dfd2534b828985fcc116e9c400fd31381e9c8f19034e39d3
       or http://127.0.0.1:8888/?token=dfd2534b828985fcc116e9c400fd31381e9c8f19034e39d3
  c:\users\maryo\appdata\local\programs\python\python39\lib\json\encoder.py:257: UserWarning: date_default is deprecated since jupyter_client 7.0.0. Use jupyter_client.jsonutil.json_default.
    return _iterencode(o, 0)
  [W 18:27:49.960 NotebookApp] Notebook Covid Data Analysis.ipynb is not trusted
  ERROR:asyncio:Exception in callback &lt;TaskStepMethWrapper object at 0x000002C98ECD81F0&gt;()
  handle: &lt;Handle &lt;TaskStepMethWrapper object at 0x000002C98ECD81F0&gt;()&gt;
  Traceback (most recent call last):
    File &quot;c:\users\maryo\appdata\local\programs\python\python39\lib\asyncio\events.py&quot;, line 80, in _run
      self._context.run(self._callback, *self._args)
  RuntimeError: Cannot enter into task &lt;Task pending name='Task-41' coro=&lt;RequestHandler._execute() running at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\web.py:1660&gt; cb=[_HandlerDelegate.execute.&lt;locals&gt;.&lt;lambda&gt;() at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\web.py:2326]&gt; while another task &lt;Task pending name='Task-40' coro=&lt;MappingKernelManager.start_kernel() running at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\notebook\services\kernels\kernelmanager.py:176&gt; cb=[IOLoop.add_future.&lt;locals&gt;.&lt;lambda&gt;() at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\ioloop.py:688]&gt; is being executed.
  ERROR:asyncio:Exception in callback &lt;TaskStepMethWrapper object at 0x000002C98DA94880&gt;()
  handle: &lt;Handle &lt;TaskStepMethWrapper object at 0x000002C98DA94880&gt;()&gt;
  Traceback (most recent call last):
    File &quot;c:\users\maryo\appdata\local\programs\python\python39\lib\asyncio\events.py&quot;, line 80, in _run
      self._context.run(self._callback, *self._args)
  RuntimeError: Cannot enter into task &lt;Task pending name='Task-30' coro=&lt;HTTP1ServerConnection._server_request_loop() running at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\http1connection.py:840&gt; cb=[IOLoop.add_future.&lt;locals&gt;.&lt;lambda&gt;() at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\ioloop.py:688]&gt; while another task &lt;Task pending name='Task-40' coro=&lt;MappingKernelManager.start_kernel() running at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\notebook\services\kernels\kernelmanager.py:176&gt; cb=[IOLoop.add_future.&lt;locals&gt;.&lt;lambda&gt;() at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\ioloop.py:688]&gt; is being executed.
  C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\jupyter_client\ioloop\manager.py:9: RuntimeWarning: coroutine 'RequestHandler._execute' was never awaited
    from .restarter import AsyncIOLoopKernelRestarter
  RuntimeWarning: Enable tracemalloc to get the object allocation traceback
  ERROR:asyncio:Task was destroyed but it is pending!
  task: &lt;Task pending name='Task-41' coro=&lt;RequestHandler._execute() running at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\web.py:1660&gt; cb=[_HandlerDelegate.execute.&lt;locals&gt;.&lt;lambda&gt;() at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\web.py:2326]&gt;
  </code></pre>