-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jedi 0.18.0 incompatibilities - anaconda-eldoc-mode causes TypeError: __init__() takes from 1 to 2 positional arguments but 5 positional arguments (and 1 keyword-only argument) were given #401
Comments
I patched anaconda slightly to give more detail about what was called (simply by extending error message to note which called function crashed) and here it is:
|
I am not 100% sure, but it seems to me that aforementioned line 99 is related to python code snippet defined inside
what also matches error message |
Doom emacs uses anaconda 0.1.13 and jedi 0.18.0. Jedi sources have the following there:
so looks like giving positional args is not supported here. |
I resolved this by changing to
but then next error appears:
so looks like there is some deeper incompatibility. 0.18.0 seems to be the newest and brightest version of jedi, so I bet it changed in incompatible way at some moment. |
Jedi changelog mentions deprecating call_signatures in entry for 0.16.0. So I suppose this bug is about patching anaconda to work with jedi 0.18.0. |
As a side note, it seems anaconda-mode.el doesn't restrict jedi version installed: it constructs pip dependency |
I reported the latter problem separately, as #402. This issue is about making anaconda work with jedi 0.18.0 |
By default anaconda installs a rather old version 0.13. 0.18 is only 6 days old though and not a good choice for anaconda as But I agree that anaconda should also work with 0.18 if that's installed. |
Unfortunately anaconda doesn't install jedi 0.13 by default. It installs newest version available on pypi at the moment (it asks for PS Force-downgrading jedi to 0.17.2 seems to help (alth. I tested it very briefly). So I'd suggest starting from #402 and adding |
Fix compatibility issues with jedi version 0.18. Require specific version of jedi and service_factory. Fall back to jedi 0.17.2 on python 2. See https://jedi.readthedocs.io/en/latest/docs/changelog.html Fix pythonic-emacs#401 Related pythonic-emacs#402
I tested it briefly and seems it is OK (jedi 0.18 was installed but now I don't see errors and eldoc hints are displayed). |
For the sake of possible Doom! Emacs users, adding to
switches to this patched version. |
I merged the PR and also created a new version tag so users of melpa-stable will get it too. |
I am just trying doom emacs, and on python files I get repeatable TypeErrors while editing python files (full traceback below). After some analysis I found that disabling anaconda-eldoc-mode resolves the issue, so the problem lies there.
*anaconda-mode*
buffer contains numerous entries like:(and again, and again, and again…)
The text was updated successfully, but these errors were encountered: