xonsh / xontrib-jedi

Xonsh Python mode completions using jedi
MIT License
18 stars 2 forks source link

AttributeError: module 'xonsh.completers' has no attribute 'base' #5

Closed anki-code closed 1 day ago

anki-code commented 1 month ago
xonsh --no-rc
$XONSH_SHOW_TRACEBACK = True
xpip install xontrib-jedi  # xontrib-jedi-0.0.2
xontrib load jedi
Traceback (most recent call last):
  File "/Users/pc/.local/xonsh-env/lib/python3.12/site-packages/xonsh/xontribs.py", line 246, in xontribs_load
    update_context(name, ctx=ctx, full_module=full_module)
  File "/Users/pc/.local/xonsh-env/lib/python3.12/site-packages/xonsh/xontribs.py", line 191, in update_context
    modctx = xontrib_context(name, full_module)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pc/.local/xonsh-env/lib/python3.12/site-packages/xonsh/xontribs.py", line 157, in xontrib_context
    module = importlib.import_module(spec.name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pc/.local/xonsh-env/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/Users/pc/.local/xonsh-env/lib/python3.12/site-packages/xontrib/jedi.py", line 163, in <module>
    xonsh.completers.base.complete_python = complete_jedi
    ^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'xonsh.completers' has no attribute 'base'
Failed to load xontrib jedi.

For community

ā¬‡ļø Please click the šŸ‘ reaction instead of leaving a +1 or šŸ‘ comment

greg-hellings commented 2 days ago

I am seeing this same error, as well.

anki-code commented 1 day ago

@jnoortheen please take a look. Thanks!

jnoortheen commented 1 day ago

I don't think we need the monkeypatching of old Python completer. lets remove that line.

anki-code commented 1 day ago

@jnoortheen it's already deleted. We just need to relesae new version from the main branch.

@greg-hellings until this just install jedi from main branch:

xpip install -U --force-reinstall git+https://github.com/xonsh/xontrib-jedi
greg-hellings commented 1 day ago

New release works like a charm