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

Cannot read anaconda-mode server response #390

Open
nanounanue opened this issue Jul 10, 2020 · 6 comments
Open

Cannot read anaconda-mode server response #390

nanounanue opened this issue Jul 10, 2020 · 6 comments

Comments

@nanounanue
Copy link

NOTE: I know that another issue (#360 ) has the same title, but apparently is a different error.

I am running GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.12) of 2020-04-11, and anaconda-mode from melpa

anaconda-mode is configured as follows:

(use-package anaconda-mode
  :init
  (add-hook 'python-mode-hook 'anaconda-mode)
  (add-hook 'python-mode-hook 'anaconda-eldoc-mode)
  (add-hook 'python-mode-hook 'display-line-numbers-mode))

The *anaconda-mode* buffer displays:

anaconda_mode port 36723

and the anaconda-response shows

# status: (:error (error connection-failed deleted
 :host 127.0.0.1 :service 36723) :error (error connection-failed failed with code 110
 :host 127.0.0.1 :service 36723))
# point: 1

I am editing local files, inside a virtualenv What I am doing wrong?

@CeleritasCelery
Copy link
Contributor

The variable anaconda-mode-server-command contains the script that is run. It takes 3 CLI arguments. These would be ~/emacs.d/anaconda-mode/0.1.13 127.0.0.1 "" if you are using the defaults on local files. See if you can run the script to start the server on the command line (you will need to copy it to a file).

@nanounanue
Copy link
Author

How are those arguments created?

I forgot to mention but I am using pyenv and the installation of anaconda-mode is handled by straight.el

@CeleritasCelery
Copy link
Contributor

They are created here

:args `("-c"
,anaconda-mode-server-command
,(anaconda-mode-server-directory)
,(if (pythonic-remote-p)
"0.0.0.0"
anaconda-mode-localhost-address)
,(or python-shell-virtualenv-root ""))))

@clwgg
Copy link

clwgg commented Oct 13, 2020

@nanounanue did you find a solution for this? I am experiencing very similar behavior. Weirdly, anaconda-mode seems to be working initially when I start up emacs, but stops working soon after with a similar message in the *anaconda-response* buffer:

# status: (:error (error connection-failed deleted
 :host 127.0.0.1 :service 44197) :error (error connection-failed failed with code 110
 :host 127.0.0.1 :service 44197))
# point: 1

I am also working on local files with a virtualenv activated through pyvenv, on emacs 27.1 and python 3.7.5.

@clwgg
Copy link

clwgg commented Nov 7, 2020

Unfortunately this problem is persisting for me, and I haven't been able to figure out what is causing it. Are there any ideas on how to debug this? Also, could someone point me to the best way to restart the anaconda server without having to restart emacs altogether? That way, I could at least make it work again once the error message pops up. Thank you!

@NightMachinery
Copy link

I get this error when I try to use anaconda-mode on a remote, tramp file. Is some setup required on the remote side?

# status: (:error (error connection-failed deleted
 :host 127.0.0.1 :service 38525) :error (error connection-failed failed with code 61
 :host 127.0.0.1 :service 38525))
# point: 1

BTW, I am happy just to get dabbrev completions when anaconda fails, but I lose everything.

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

4 participants