Closed hroncok closed 2 years ago
Simply removing loop=loop
fixes the problem, but I am not sure what Python versions does that support.
The docs say this is deprecated since 3.7. Jupyter continues to support Python 3.6 though. If Jupyter is part of the scientific community, then NEP 29 says that 3.6 should be dropped. Otherwise you may need a switch for Python 3.6.
This isn't fixed by #244, right? If not, then maybe you should submit a pull request that removes loop=loop
and bumps the version to 3.7? After all Python 3.6 is end of life in 4 weeks. (December 2021)
That works! Thanks.
After fixing this error (removing 'loop=loop') mentioned above, I'm receiving this warning when I start jupyter-console:
c:\developing\python\lib\site-packages\zmq\_future.py:591: RuntimeWarning: Proactor event loop does not implement add_reader family of methods required for zmq. Registering an additional selector thread for add_reader support via tornado. Use `asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())` to avoid this warning.
self._get_loop()
Thanks
Inside de console, I'm unable to execute any command (like '2+2'). I receive this exception:
c:\developing\python\lib\site-packages\jupyter_console\ptshell.py:852: RuntimeWarning: coroutine 'ZMQSocketChannel.msg_ready' was never awaited
while self.client.iopub_channel.msg_ready():
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Unhandled exception in event loop:
File "c:\developing\python\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "c:\developing\python\lib\site-packages\prompt_toolkit\input\win32.py", line 613, in ready
callback()
File "c:\developing\python\lib\site-packages\prompt_toolkit\application\application.py", line 690, in read_from_input
self.key_processor.process_keys()
File "c:\developing\python\lib\site-packages\prompt_toolkit\key_binding\key_processor.py", line 271, in process_keys
self._process_coroutine.send(key_press)
File "c:\developing\python\lib\site-packages\prompt_toolkit\key_binding\key_processor.py", line 186, in _process
self._call_handler(matches[-1], key_sequence=buffer[:])
File "c:\developing\python\lib\site-packages\prompt_toolkit\key_binding\key_processor.py", line 321, in _call_handler
handler.call(event)
File "c:\developing\python\lib\site-packages\prompt_toolkit\key_binding\key_bindings.py", line 124, in call
result = self.handler(event)
File "c:\developing\python\lib\site-packages\jupyter_console\ptshell.py", line 475, in _
self.handle_iopub()
File "c:\developing\python\lib\site-packages\jupyter_console\ptshell.py", line 854, in handle_iopub
msg_type = sub_msg['header']['msg_type']
Exception 'coroutine' object is not subscriptable
Press ENTER to continue...
Thanks
Fixed in #264.
Hello. The code in here:
https://github.com/jupyter/jupyter_console/blob/64f1695d7efbc60d29b98e652b3d71fb9227eb07/jupyter_console/ptshell.py#L664
Fails with this on Python 3.10:
The issue is that asyncio.wait() no longer accepts the loop keyword in python 3.10; see https://docs.python.org/3.10/library/asyncio-task.html#waiting-primitives.