Giter Site home page Giter Site logo

Comments (11)

guysv avatar guysv commented on July 28, 2024 1

I managed to reproduce the bug on a debian:bookworm container, will investigate!

from ilua.

raph-amiard avatar raph-amiard commented on July 28, 2024 1

Hi here

FWIW, I reproduce on my debian install

from ilua.

hroncok avatar hroncok commented on July 28, 2024 1

So jupyter/jupyter_console#244 appears to fix this.

from ilua.

guysv avatar guysv commented on July 28, 2024

Thanks for the report, will look into it today hopefully 🙏 .

It appears from a glance that some dependency was not pinned correctly.
May you provide me with you operating system version?

from ilua.

averms avatar averms commented on July 28, 2024

It appears from a glance that some dependency was not pinned correctly. May you provide me with you operating system version?

Sorry, I missed this. I'm using Arch Linux.

from ilua.

averms avatar averms commented on July 28, 2024

Might be related to jupyter/jupyter_console#241

EDIT: Problem goes away if you downgrade jupyter-client to 6.1.12. The exact set of steps:

  1. virtualenv venv && . venv/bin/activate
  2. pip install jupyter_client=='6.*'
  3. pip install git+https://github.com/guysv/ilua.git@master
  4. ilua -i lua5.2 and everything works.

from ilua.

hroncok avatar hroncok commented on July 28, 2024

I've got this immediatelly:

ILua 0.2.1Traceback (most recent call last):
  File "/builddir/__venv__/bin/ilua", line 8, in <module>
    sys.exit(main())
  File "/builddir/__venv__/lib64/python3.10/site-packages/ilua/consoleapp.py", line 37, in main
    ILuaConsoleApp().run()
  File "/builddir/__venv__/lib64/python3.10/site-packages/ilua/consoleapp.py", line 34, in run
    ZMQTerminalIPythonApp.launch_instance(argv=['--kernel', 'lua'])
  File "/builddir/__venv__/lib64/python3.10/site-packages/jupyter_core/application.py", line 264, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/builddir/__venv__/lib64/python3.10/site-packages/traitlets/config/application.py", line 846, in launch_instance
    app.start()
  File "/builddir/__venv__/lib64/python3.10/site-packages/jupyter_console/app.py", line 148, in start
    self.shell.mainloop()
  File "/builddir/__venv__/lib64/python3.10/site-packages/jupyter_console/ptshell.py", line 664, in mainloop
    main_task = asyncio.wait(tasks, loop=loop, return_when=asyncio.FIRST_COMPLETED)
TypeError: wait() got an unexpected keyword argument 'loop'
sys:1: RuntimeWarning: coroutine 'ZMQTerminalInteractiveShell.interact' was never awaited

With fresh venv install of ilua from pypi on Python 3.10:

Package           Version
----------------- -------
attrs             21.4.0
Automat           20.2.0
backcall          0.2.0
constantly        15.1.0
debugpy           1.5.1
decorator         5.1.0
entrypoints       0.3
hyperlink         21.0.0
idna              3.3
ilua              0.2.1
incremental       21.3.0
ipykernel         6.6.0
ipython           7.30.1
jedi              0.18.1
jupyter-client    7.1.0
jupyter-console   6.4.0
jupyter-core      4.9.1
matplotlib-inline 0.1.3
nest-asyncio      1.5.4
parso             0.8.3
pexpect           4.8.0
pickleshare       0.7.5
pip               21.3.1
prompt-toolkit    3.0.24
ptyprocess        0.7.0
Pygments          2.11.1
python-dateutil   2.8.2
pyzmq             22.3.0
setuptools        59.6.0
six               1.16.0
termcolor         1.1.0
tornado           6.1
traitlets         5.1.1
Twisted           21.7.0
txZMQ             1.0.0
typing_extensions 4.0.1
wcwidth           0.2.5
zope.interface    5.4.0

And I also get this after hitting enter when selecting something from the autocomplete option list:

ILua 0.2.1

Unhandled exception in event loop:
  File "/usr/lib64/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib/python3.10/site-packages/prompt_toolkit/input/vt100.py", line 170, in callback_wrapper
    callback()
  File "/usr/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 690, in read_from_input
    self.key_processor.process_keys()
  File "/usr/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_processor.py", line 271, in process_keys
    self._process_coroutine.send(key_press)
  File "/usr/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_processor.py", line 186, in _process
    self._call_handler(matches[-1], key_sequence=buffer[:])
  File "/usr/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_processor.py", line 321, in _call_handler
    handler.call(event)
  File "/usr/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_bindings.py", line 124, in call
    result = self.handler(event)
  File "/usr/lib/python3.10/site-packages/jupyter_console/ptshell.py", line 486, in _
    more, indent = self.check_complete(d.text)
  File "/usr/lib/python3.10/site-packages/jupyter_console/ptshell.py", line 609, in check_complete
    return self.handle_is_complete_reply(msg_id,
  File "/usr/lib/python3.10/site-packages/jupyter_console/ptshell.py", line 790, in handle_is_complete_reply
    msg = run_sync(self.client.shell_channel.get_msg)(block=True, timeout=timeout)
  File "/usr/lib/python3.10/site-packages/jupyter_client/utils.py", line 21, in wrapped
    future = asyncio.ensure_future(coro(*args, **kwargs))

Exception ZMQSocketChannel.get_msg() got an unexpected keyword argument 'block'

On Fedora 36 with system packages:

Package           Version
----------------- --------
attrs             21.2.0
Automat           20.2.0
backcall          0.1.0
constantly        15.1.0
decorator         5.1.0
entrypoints       0.3
hyperlink         21.0.0
idna              3.3
ilua              0.2.1
incremental       21.3.0
ipykernel         6.4.1
ipython           7.29.0
ipython_genutils  0.2.0
jedi              0.18.1
jupyter-client    7.1.0
jupyter-console   6.4.0
jupyter-core      4.9.1
matplotlib-inline 0.1.2
nest-asyncio      1.5.4
parso             0.8.2
pexpect           4.8.0
pickleshare       0.7.5
pip               21.3.1
prompt-toolkit    3.0.24
ptyprocess        0.6.0
pycurl            7.44.1
Pygments          2.10.0
python-dateutil   2.8.1
pyzmq             22.2.1
setuptools        59.6.0
six               1.16.0
termcolor         1.1.0
tornado           6.1
traitlets         5.1.1
Twisted           21.7.0
txZMQ             1.0.0
typing-extensions 3.10.0.2
wcwidth           0.2.5
zope.interface    5.4.0

I comment here instead of opening another issue because I believe this is all related to some updated depndency.

from ilua.

WolfangAukang avatar WolfangAukang commented on July 28, 2024

FYI, I was able to reproduce this on NixOS. Using Jupyter console 6.4.0 and ILua 0.2.1.

from ilua.

ahillio avatar ahillio commented on July 28, 2024

This looks like a problem with jupyter_console itself. I get this same traceback (everytime, just as in ilua) when I run jupyter_console itself from my terminal.

In [1]: exit/home/me/.local/lib/python3.8/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 "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/home/me/.local/lib/python3.8/site-packages/prompt_toolkit/input/vt100.py", line 168, in callback_wrapper
    callback()
  File "/home/me/.local/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 691, in read_from_input
    self.key_processor.process_keys()
  File "/home/me/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_processor.py", line 274, in process_keys
    self._process_coroutine.send(key_press)
  File "/home/me/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_processor.py", line 186, in _process
    self._call_handler(matches[-1], key_sequence=buffer[:])
  File "/home/me/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_processor.py", line 329, in _call_handler
    handler.call(event)
  File "/home/me/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_bindings.py", line 102, in call
    result = self.handler(event)
  File "/home/me/.local/lib/python3.8/site-packages/jupyter_console/ptshell.py", line 475, in _
    self.handle_iopub()
  File "/home/me/.local/lib/python3.8/site-packages/jupyter_console/ptshell.py", line 854, in handle_iopub
    msg_type = sub_msg['header']['msg_type']

Exception 'coroutine' object is not subscriptable

I'm investing the solution @hroncok apparently found...

from ilua.

ahillio avatar ahillio commented on July 28, 2024

Indeed. Solved with pip3 install --upgrade jupyter_console, updating that (I think these are the versions) from 6.4.0 to 6.4.3.

from ilua.

averms avatar averms commented on July 28, 2024

Closing since it seems to be fixed now.

from ilua.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.