Comments (14)
For the sake of possible Doom! Emacs users, adding to packages.el
:
(package! anaconda-mode
:recipe (:host github :repo "dakra/anaconda-mode")
:pin "810163d5a65e62d58f363e2edaa3be70e6d82e25")
switches to this patched version.
from anaconda-mode.
Doom emacs uses anaconda 0.1.13 and jedi 0.18.0. Jedi sources have the following there:
def __init__(self, code=None, *, path=None, environment=None, project=None):
so looks like giving positional args is not supported here.
from anaconda-mode.
I merged the PR and also created a new version tag so users of melpa-stable will get it too.
from anaconda-mode.
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:
service_factory.exceptions.ServiceException: (500, '{"jsonrpc": "2.0", "id": 1, "error": {"code": -32000, "message": "Server error: Calling <function eldoc at 0x7f7c79d31160> with named args: source=..., line=17, column=11, path=\'/home/marcink/GAUSS/python/sfx__repository/sample/repo/basic_log.py\'", "data": "TypeError(\'__init__() takes from 1 to 2 positional arguments but 5 positional arguments (and 1 keyword-only argument) were given\')"}}')
from anaconda-mode.
I am not 100% sure, but it seems to me that aforementioned line 99 is related to python code snippet defined inside anaconda-mode-server-command
. If so, it is triggered by:
result = f(jedi.Script(source, line, column, path, environment=virtual_environment))
what also matches error message
from anaconda-mode.
I resolved this by changing to
result = f(jedi.Script(source, path=path, environment=virtual_environment))
but then next error appears:
Traceback (most recent call last):
File "/home/marcink/DEV_git/emacs/doom-emacs/.local/etc/anaconda/0.1.13/service_factory-0.1.6-py3.8.egg/service_factory/service.py", line 101, in apply
result = method(**params)
File "<string>", line 100, in wrapper
File "<string>", line 156, in eldoc
AttributeError: 'Script' object has no attribute 'call_signatures'
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.
from anaconda-mode.
Jedi changelog mentions deprecating call_signatures in entry for 0.16.0.
Looking at the repo, it seems the method was actually removed at 0.18.0 (0.17.2 has it).
So I suppose this bug is about patching anaconda to work with jedi 0.18.0.
from anaconda-mode.
As a side note, it seems anaconda-mode.el doesn't restrict jedi version installed: it constructs pip dependency jedi>=0.13.0
but doesn't limit upper version. Probably it would be better to limit two-side.
from anaconda-mode.
I reported the latter problem separately, as #402. This issue is about making anaconda work with jedi 0.18.0
from anaconda-mode.
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
it doesn't have python 2 support.
But I agree that anaconda should also work with 0.18 if that's installed.
Would be great if you can help with a PR that supports both (all) jedi versions.
from anaconda-mode.
Unfortunately anaconda doesn't install jedi 0.13 by default. It installs newest version available on pypi at the moment (it asks for jedi>=0.13
what since Dec 25th results in 0.18). But that's #402.
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 <0.18
restriction for jedi there, to resolve the immediate issue.
from anaconda-mode.
@Mekk Can you check if #403 works ?
from anaconda-mode.
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).
from anaconda-mode.
Works fine for me too, thanks!
Recently I upgraded python to 3.9 on my laptop and rebuild all environments, anaconda-mode was broken due to installed fresh version of jedi.
Thanks @dakra for his patch, it solved the problem!
from anaconda-mode.
Related Issues (20)
- Anaconda causes extreme slowness on remote links with pyvenv HOT 5
- Restricting newest jedi version allowed (and making it possible to configure this requirement) HOT 3
- autocomplete broken 'wrong-type-argument listp' HOT 2
- Can not read anaconda-mode server response over tramp
- anaconda-mode logs anaconda-mode-server-command to systemctl status HOT 7
- Symbol’s function definition is void: pythonic-local-p HOT 2
- As of setuptools 53.0 .command.easy_install.main() is removed breaking anaconda-mode HOT 3
- [FR] Add option to disable anaconda-mode's RPC calls completely when on TRAMP HOT 1
- anaconda-mode does not complete modules from pip3
- Skip to the cpython primitive definition of the python function/operator.
- Can not import packages installed in server_directory when using docker HOT 5
- Cannot Read Anaconda Mode Server Response (Again)
- python: remove implicit pip dependency
- replace distutils.version by packaging.version HOT 4
- A server errors appears as I interact with the server HOT 2
- Eldoc error: bad url
- Anaconda does not retrieve signatures for certain functions, even though jedi does HOT 2
- `conda-mode-find-definitions` on constant variable points to class, not the def site
- `EOFError: Ran out of input` in spacemacs HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anaconda-mode.