Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign updeferred error : (error ""AttributeError("'Definition' object has no attribute 'get_code' ",)"") #293
Comments
sdilts
changed the title from
deferred error : (error "\"AttributeError(\\\"'Definition' object has no attribute 'get_code'\\\",)\"")
to
deferred error : (error ""AttributeError("'Definition' object has no attribute 'get_code' ",)"")
Sep 28, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
albertodonato
Oct 12, 2017
I have a similar AttributeError, on a different attribute: (error "\"AttributeError(\\\"'module' object has no attribute 'defined_names'\\\",)\"")
I have the following package versions in my virtualenv:
$ pip freeze
epc==0.0.5
jedi==0.11.0
jediepcserver==0.2.7
parso==0.1.0
pkg-resources==0.0.0
sexpdata==0.0.3
and jedi version 20160425.2156
albertodonato
commented
Oct 12, 2017
|
I have a similar AttributeError, on a different attribute: I have the following package versions in my virtualenv:
and jedi version |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sdilts
Oct 12, 2017
sdilts
commented
Oct 12, 2017
|
Which function are you calling when the error occurs?
…On Oct 12, 2017 06:26, "Alberto Donato" ***@***.***> wrote:
I have a similar AttributeError, on a different attribute: (error
"\"AttributeError(\\\"'module' object has no attribute
'defined_names'\\\",)\"")
I have the following package versions in my virtualenv:
$ pip freeze
epc==0.0.5
jedi==0.11.0
jediepcserver==0.2.7
parso==0.1.0
pkg-resources==0.0.0
sexpdata==0.0.3
and jedi version 20160425.2156
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#293 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALS35kfLegyNQj3FQmfHVvqfjx6A6tHAks5srgWIgaJpZM4Pmtd9>
.
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
albertodonato
Oct 12, 2017
@sdilts I'm not calling anything explicitly, this keeps popping up in messages when I edit python files, even if I just open an empty one.
albertodonato
commented
Oct 12, 2017
|
@sdilts I'm not calling anything explicitly, this keeps popping up in messages when I edit python files, even if I just open an empty one. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
albertodonato
Oct 12, 2017
This is a trace of the server running with debug:
$ ~/virtualenv/emacs/bin/jediepcserver --port-file ~/.emacs-packages/jedi-core-20170121.610/jedi-port.log --ipdb
(AutoLog) Called: EPCHandler.setup()
(AutoLog) Returns: EPCHandler.setup(...) = None
(AutoLog) Called: EPCHandler.handle()
receiving...
received: length = 94; data = b'(call 203 defined_names ("\nimport argparse\n\nargparse\n\n\nargparse.\n" "/home/ack/Desktop/t.py"))\n'
(AutoLog) Called: EPCHandler._handle(b'(call 203 defined_names ("\nimport argparse\n\nargparse\n\n\nargparse.\n" "/home/ack/Desktop/t.py"))\n')
(AutoLog) Called: EPCHandler._handle_call(203, Symbol('defined_names'), ['\nimport argparse\n\nargparse\n\n\nargparse.\n', '/home/ack/Desktop/t.py'])
ERROR:epc:AttributeError("module 'jedi.api' has no attribute 'defined_names'",)
AttributeError("module 'jedi.api' has no attribute 'defined_names'",)
ERROR:epc:Unexpected error
Traceback (most recent call last):
File "/home/ack/virtualenv/emacs/lib/python3.6/site-packages/epc/handler.py", line 242, in _handle
reply = handler(uid, *args)
File "/home/ack/virtualenv/emacs/lib/python3.6/site-packages/epc/utils.py", line 51, in new_method
ret = method(self, *args, **kwds)
File "/home/ack/virtualenv/emacs/lib/python3.6/site-packages/epc/handler.py", line 265, in _handle_call
return ['return', uid, func(*args)]
File "/home/ack/virtualenv/emacs/lib/python3.6/site-packages/jediepcserver.py", line 179, in defined_names
return list(map(get_names_recursively, jedi.api.defined_names(*args)))
AttributeError: module 'jedi.api' has no attribute 'defined_names'
Unexpected error
Traceback (most recent call last):
File "/home/ack/virtualenv/emacs/lib/python3.6/site-packages/epc/handler.py", line 242, in _handle
reply = handler(uid, *args)
File "/home/ack/virtualenv/emacs/lib/python3.6/site-packages/epc/utils.py", line 51, in new_method
ret = method(self, *args, **kwds)
File "/home/ack/virtualenv/emacs/lib/python3.6/site-packages/epc/handler.py", line 265, in _handle_call
return ['return', uid, func(*args)]
File "/home/ack/virtualenv/emacs/lib/python3.6/site-packages/jediepcserver.py", line 179, in defined_names
return list(map(get_names_recursively, jedi.api.defined_names(*args)))
AttributeError: module 'jedi.api' has no attribute 'defined_names'
albertodonato
commented
Oct 12, 2017
|
This is a trace of the server running with debug:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jrab89
Oct 23, 2017
My eldoc-style call signature help recently stopped working. If I run jedi:get-in-function-call I get:
deferred error : (error "\"AttributeError(\\\"'Definition' object has no attribute 'get_code'\\\",)\"")
jrab89
commented
Oct 23, 2017
|
My eldoc-style call signature help recently stopped working. If I run
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
albertodonato
Oct 23, 2017
It seems defined_names is part of a depreated API that was dropped in jedi 0.11.0 (davidhalter/jedi@d6a04b2)
albertodonato
commented
Oct 23, 2017
|
It seems |
albertodonato
referenced a pull request that will
close
this issue
Oct 23, 2017
Open
Replace defined_names() with names() #296
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jrab89
Oct 23, 2017
@albertodonato I uninstalled jedi 0.11.0 in my emacs' virtualenv and installed jedi 0.10.2 and now my eldoc-style call signature help is working again
jrab89
commented
Oct 23, 2017
|
@albertodonato I uninstalled jedi 0.11.0 in my emacs' virtualenv and installed jedi 0.10.2 and now my eldoc-style call signature help is working again |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
albertodonato
commented
Oct 23, 2017
|
@jrab89 the PR above fixes it for me with 0.11.0 too |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sdilts
Oct 23, 2017
There is a second place where it needs to be changed, which I added in this pull request: Fixed Issue #294
sdilts
commented
Oct 23, 2017
•
|
There is a second place where it needs to be changed, which I added in this pull request: Fixed Issue #294 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
albertodonato
commented
Nov 14, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Yevgnen
commented
Jan 31, 2018
|
Any update? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
RobinTournemenne
Jan 31, 2018
(This message is intended for newbies like me). I tried the solution of @albertodonato and @sdilts but my level in emacs and python was too low to make it work (I modified by hand line 103 105 and 179 of jediepcserver.py of the folder elpa/jedi-core/ + installing again everything).
The solution of @jrab89 was the winner: i installed in my real python (compared to the virtualenv one created by jedi.el) an older version of jedi: pip3 install jedi==0.10.2 (pip3 because I run python on mac OS which is a mess: https://docs.brew.sh/Homebrew-and-Python.html)
By the way, yes, jedi and jedi.el are two completely different "things".
Then an old-fashioned copy and replace of the two folders jedi/ jedi-0.10.2.dist-info/ located in the site-packages/ folder of my real python3 environment in the site-packages/ folder of the virtualenv created by jedi.el did the trick.
Good luck!
RobinTournemenne
commented
Jan 31, 2018
|
(This message is intended for newbies like me). I tried the solution of @albertodonato and @sdilts but my level in emacs and python was too low to make it work (I modified by hand line 103 105 and 179 of jediepcserver.py of the folder elpa/jedi-core/ + installing again everything). The solution of @jrab89 was the winner: i installed in my real python (compared to the virtualenv one created by jedi.el) an older version of jedi: pip3 install jedi==0.10.2 (pip3 because I run python on mac OS which is a mess: https://docs.brew.sh/Homebrew-and-Python.html) By the way, yes, jedi and jedi.el are two completely different "things". Then an old-fashioned copy and replace of the two folders jedi/ jedi-0.10.2.dist-info/ located in the site-packages/ folder of my real python3 environment in the site-packages/ folder of the virtualenv created by jedi.el did the trick. Good luck! |
sdilts commentedSep 28, 2017
This error occurs whenever a functions signature is grabbed with
jedi:get-in-function-call, and originates at line 103:emacs-jedi/jediepcserver.py
Line 103 in b0764f4
This prevents jedi-mode from doing any sort of function signature completion.
Package version is
20160425.2156. The relevant code in my.emacsfile isI have uninstalled/reinstalled
jedi-modethrough the package manager several times, as well removing the server manually deleting the installation folder. The server has then always been reinstalled withjedi:install-server.