Skip to content
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

elpy-goto-definition is broken, asks for jedi, although elpy-config shows jedi is installed #1820

Closed
njheyu opened this issue Jul 6, 2020 · 2 comments

Comments

@njheyu
Copy link

njheyu commented Jul 6, 2020

Summary

I am having trouble calling elpy-goto-definition with M-. , either prompts "Visit tags table" or complains "This feature requires the 'jedi' package to be installed, depending on whether I press M-. or call elpy-goto-definition directly, although elpy-config seems fine.

Steps to reproduce

If I press "M-." I see a prompt of "Visit tags table (default TAGS): current-folder-name"
If I call describe key "M-.", it is bounded to "xref-find-definitions", and if I type "M-x xref-find-definitions" I see the same prompt as above.
If I type "M-x elpy-goto-definition". The message complains "This feature requires the 'jedi' package to be installed. Please check 'elpy-config' for more information. However when I run elpy-config everything seems fine. And I can indeed 'import jedi' from the virtualenv I am using.

M-. used to work for me but I must have changed something and now I don't know how to make it work again.
This may be the same as the issues here
#1795
#1771

My configuration

OS

Debian 9

Result of (elpy-config)

Elpy Configuration

 

Emacs.............: 26.3

Elpy..............: 1.32.0

Virtualenv........:  (/nas/local/simscripts/hera/.nest/mi20200626/)

Interactive Python: python 3.6.10 (/nas/local/simscripts/hera/.nest/mi20200626/bin/python)

RPC virtualenv....: rpc-venv (/home/hera/.emacs.d/elpy/rpc-venv)

Python...........: /nas/local/simscripts/hera/.nest/mi20200626/bin/python 3.6.10 (/nas/local/simscripts/hera/.nest/mi20200626/bin/python)

Jedi.............: 0.17.1

Rope.............: 0.17.0

Autopep8.........: 1.5.3

Yapf.............: 0.30.0

Black............: 19.10b0

Syntax checker....: flake8 (/nas/local/simscripts/hera/.nest/mi20200626/bin/flake8)

 

Warnings

 

Options

 

`Raised' text indicates buttons; type RET or click mouse-1 on a button

to invoke its action.  Invoke [+] to expand a group, and [-] to

collapse an expanded group.  Invoke the [Group], [Face], and [Option]

buttons below to edit that item in another window.

 

[+]-- Group Elpy

[+]-- Group Python

[+]-- Group Virtual Environments (Pyvenv)

[+]-- Group Completion (Company)

[+]-- Group Call Signatures (ElDoc)

[+]-- Group Inline Errors (Flymake)

[+]-- Group Code folding (hideshow)

[+]-- Group Snippets (YASnippet)

[+]-- Group Directory Grep (rgrep)

[+]-- Group Search as You Type (ido)

[+]-- Group Django extension

[+]-- Group Autodoc extension

Elpy configuration in my init.el

(elpy-enable)
(setq elpy-rpc-python-command "/nas/local/simscripts/hera/.nest/mi20200626/bin/python")
(pyvenv-activate (expand-file-name "/nas/local/simscripts/hera/.nest/mi20200626"))

(setq python-shell-interpreter "jupyter"
            python-shell-interpreter-args "console --simple-prompt"
          python-shell-prompt-detect-failure-warning nil
 )
(add-to-list 'python-shell-completion-native-disabled-interpreters "jupyter")

(defun my-python-mode-hook ()
    (elpy-mode 1)
    (setq elpy-rpc-backend "jedi")
)
(add-hook 'python-mode-hook 'my-python-mode-hook)
@njheyu njheyu changed the title elpy-goto-definition is broken, although elpy-config seems fine elpy-goto-definition is broken, asks for jedi, although elpy-config shows jedi is installed Jul 8, 2020
@njheyu
Copy link
Author

njheyu commented Jul 17, 2020

I did a bunch of reinstalling and upgrade and the problem magically went away.

@njheyu njheyu closed this as completed Jul 17, 2020
@ckulemeyer
Copy link

ckulemeyer commented Jan 25, 2021

@njheyu Do you remember what you reinstalled and upgraded? On my system the problem described magically appeared without changing anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants