jupyter / jupyter_console

Jupyter Terminal Console
http://jupyter-console.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
248 stars 146 forks source link

Bug: Raise RuntimeError when starting #247

Closed wty20060888 closed 1 year ago

wty20060888 commented 3 years ago

Device: Raspberry Pi 4B

OS: Ubuntu 20.04

Version:

Python 3.8 jupyter 1.0.0 jupyter-client 6.2.0 jupyter-console 6.4.0 jupyter-core 4.7.1

uncomment these two lines in the file jupyter_console_config.py

start a session with command:

jupyter console

and these show up:

Shutting down kernel Task exception was never retrieved future: <Task finished name='Task-9' coro=<ZMQTerminalInteractiveShell.handle_external_iopub() done, defined at /usr/local/lib/python3.8/dist-packages/jupyter_console-6.4.1.dev0-py3.8.egg/jupyter_console/ptshell.py:835> exception=RuntimeError("There is no current event loop in thread 'ThreadPoolExecutor-0_0'.")> Traceback (most recent call last): File "/usr/lib/python3.8/asyncio/tasks.py", line 282, in __step result = coro.throw(exc) File "/usr/local/lib/python3.8/dist-packages/jupyter_console-6.4.1.dev0-py3.8.egg/jupyter_console/ptshell.py", line 839, in handle_external_iopub poll_result = await loop.run_in_executor( File "/usr/lib/python3.8/asyncio/futures.py", line 260, in await yield self # This tells Task to wait for completion. File "/usr/lib/python3.8/asyncio/tasks.py", line 349, in __wakeup future.result() File "/usr/lib/python3.8/asyncio/futures.py", line 178, in result raise self._exception File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/home/ubuntu/.local/lib/python3.8/site-packages/zmq/_future.py", line 306, in poll f = p.poll(timeout) File "/home/ubuntu/.local/lib/python3.8/site-packages/zmq/_future.py", line 61, in poll future = self._Future() File "/usr/lib/python3.8/asyncio/events.py", line 639, in get_event_loop raise RuntimeError('There is no current event loop in thread %r.' RuntimeError: There is no current event loop in thread 'ThreadPoolExecutor-0_0'.

If I don't change the config file, the command jupyter console can be executed normally.