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

Anaconda mode opening new windows with errors #164

Closed
badders opened this issue Feb 25, 2016 · 46 comments
Closed

Anaconda mode opening new windows with errors #164

badders opened this issue Feb 25, 2016 · 46 comments

Comments

@badders
Copy link

badders commented Feb 25, 2016

Generally the autocompletion seems to be working ok and popping up with correct methods and the documentation, but it constantly opens a new emacs window with:

status: (:error (error connection-failed failed with code 10061 : host 127.0.0.1 :service 9000))

point 1

It wouldn't be so bad but focus jumps to that window every time

Emacs 25, 64 bit, latest anaconda-mode, setup is the default spacemacs configuration

@badders
Copy link
Author

badders commented Feb 25, 2016

New window is titled anaconda-response if that helps

@proofit404
Copy link
Contributor

I need the value of python-shell-interpreter and python-shell-virtualenv-path variables. Does minibuffer contain some error messages? What is the content of *anaconda-mode* buffer?

@badders
Copy link
Author

badders commented Feb 26, 2016

python-shell-interpreter: ipython
python-shell-virtualenv-path: nil
anaconda-mode buffer contains just: anaconda_mode port 9000

no message in minibuffer

@badders
Copy link
Author

badders commented Feb 26, 2016

Note I don't set either of those variables myself, they are just the defaults on this system

@proofit404
Copy link
Contributor

Does this happens when you switch buffers? Does this error happens when you constantly typing within one buffer.

@proofit404
Copy link
Contributor

Do you use pyenv tool?

@badders
Copy link
Author

badders commented Feb 26, 2016

Dont use pyenv, the python i have installed is the anaconda distribution from continuum, version 2.5 (latest). This error happens when just opeining one python file and doing something like:

import pandas as pd
import numpy as np

pd.read_ or np.arra and waiting for completion

Usually it works for the first 1 or 2 completions, then fails.

@proofit404
Copy link
Contributor

Does M-: (anaconda-mode-running-p) evaluates to nil after 1 or 2 completions?

@badders
Copy link
Author

badders commented Feb 29, 2016

Nope, after i get the status error window pop up it evaluates to:

(run open listen connect stop)

@vladimir-vovk
Copy link

vladimir-vovk commented Jun 15, 2016

Same issue appears randomly when I typing...

# status: (:error (error connection-failed failed with code 35
 :host 127.0.0.1 :service 9000))
# point: 1

emacs 24.5, spacemacs 0.105.21

@proofit404
Copy link
Contributor

I have no idea what can cause this problem.

@shackra
Copy link

shackra commented Jun 24, 2016

I'm experiencing this as well:

# status: (:error (error connection-failed failed with code 111
 :host localhost :service 8118))

8118 is the port of my local Privoxy installation, I have it set as a environment variable http_proxy so the entire system knows about it.

@proofit404
Copy link
Contributor

@shackra Set no_proxy variable as well to exclude localhost from proxy settings.

@shackra
Copy link

shackra commented Jun 24, 2016

For those curious, @proofit404 talks about this https://www.gnu.org/software/emacs/manual/html_node/url/Proxies.html

@proofit404
Copy link
Contributor

Exactly. Thanks for clarification!

@shackra
Copy link

shackra commented Jun 24, 2016

The error persists even thought no_proxy is set and Emacs successfully returns the variable definition with (getenv "no_proxy")

@proofit404
Copy link
Contributor

What is the value of url-proxy-services variable?

@shackra
Copy link

shackra commented Jun 24, 2016

url-proxy-services is a variable defined in `url-vars.el'.
Its value is (("no_proxy" . "\\(localhost\\|192\\.168\\..*\\..*\\)")
 ("http" . "localhost:8118"))

Original value was nil

@proofit404
Copy link
Contributor

Try to set no_proxy to localhost only and see if it works.

@shackra
Copy link

shackra commented Jun 26, 2016

the issue is still alive and kicking, even with the change you requested me to introduce:

url-proxy-services is a variable defined in `url-vars.el'.
Its value is (("no_proxy" . "\\(localhost\\)")
 ("http" . "localhost:8118"))

Original value was nil

@proofit404
Copy link
Contributor

No idea how to fix this.

@shackra
Copy link

shackra commented Jun 26, 2016

😵

El 26 de junio de 2016 3:21:23 GMT-06:00, Malyshev Artem notifications@github.com escribió:

No idea how to fix this.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#164 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@badders
Copy link
Author

badders commented Jul 2, 2016

Just to add that i also had the no_proxy set for localhost when getting this issue

@churtado
Copy link

churtado commented Aug 6, 2016

I'm also getting this issue

@aumana
Copy link

aumana commented Aug 11, 2016

Same issue using emacs prelude

@proofit404
Copy link
Contributor

Does anyone have an idea where I can find connection failure codes table?

@binjo
Copy link

binjo commented Aug 12, 2016

FTR, try restart the emacs, which should restart the releated process, the error gone for me, I didn't look into root cause...

@proofit404
Copy link
Contributor

@binjo you don't need to restart text editor. Just use M-x (anaconda-mode-stop) RET

@3rd3
Copy link

3rd3 commented Aug 24, 2016

Same problem through some Spacemacs configuration.

@xarthurx
Copy link

Same problem through spacemacs configuration.
And when closing emacs, it shows there are may 127.0.0.1 buffer open that tries to connect with the command (network connection to 127.0.0.1)

@invokesus
Copy link

Having the same problem any suggestions?

@sulami
Copy link

sulami commented Feb 27, 2017

I noticed somewhat severe lag when editing a ~3.5k lines python source file, and the error buffer popping up and stealing focus every couple of words. Both went away when I just nuked ~3k lines from the file, so it might just be a timeout issue when it's trying to lookup autocompletion suggestions or something like that.

@proofit404
Copy link
Contributor

I can't find any description of the connection error codes used in Emacs. You can help if you research this question.

@sulami
Copy link

sulami commented Feb 27, 2017

I this error code 35 was coming from the syscall, it would be EDEADALK, "Resource deadlock would occur". I don't know anything about the internal structure of anaconda-mode, but could it be the case that it's trying to open a connection before a previous one is finished or something similar, causing a conflict? Because I can very quickly reproduce this issue by typing random characters into python files with >3k lines, where everything especially autocompletion starts to take a second or two to return suggestions.

@proofit404
Copy link
Contributor

I suspect it's come from parallel querying overloaded python process.

@invokesus
Copy link

#190 This is the issue I seem to be facing. It's trying to use the proxy to access localhost even though no_proxy is set. Setting http_proxy to "" works but no_proxy doesn't.

@skrech
Copy link

skrech commented Feb 28, 2017

I have the same problem. However, I think that it's related to anaconda-eldoc-mode.
If I remove (add-hook 'python-mode-hook 'anaconda-eldoc-mode) from my init file everything seems to be working OK.

@proofit404
Copy link
Contributor

Eldoc make queries as you move point. So it is still a problem with parallel queries.

@eserge
Copy link

eserge commented Mar 2, 2017

To me it only happens when I edit large python files. So the suspicion about overloaded python processes seems reasonable.

@penn201500
Copy link

(remove-hook 'anaconda-mode-response-read-fail-hook
'anaconda-mode-show-unreadable-response)

seems like solved this problem

syl20bnr/spacemacs#3772

@skrech
Copy link

skrech commented May 30, 2017

Just wanted to add that when the problem happens this is what list-processes is showing:

127.0.0.1       open    --              --           (network connection to 127.0.0.1)
127.0.0.1<1>    open     *http 127.0... --           (network connection to 127.0.0.1)
127.0.0.1<2>    open     *http 127.0... --           (network connection to 127.0.0.1)
127.0.0.1<3>    open     *http 127.0... --           (network connection to 127.0.0.1)
127.0.0.1<4>    open     *http 127.0... --           (network connection to 127.0.0.1)
127.0.0.1<5>    open     *http 127.0... --           (network connection to 127.0.0.1)
anaconda-mode   run     *anaconda-mode* --           python -c 
import sys, site
site.addsitedir('.')
import anaconda_mode
anaconda_mode.main(sys.argv[1:])

When anaconda-mode is working OK (for example without eldoc mode support) there is only one connection opened for the localhost.

@paddyhoran
Copy link

Same issue here.

Fix mentioned by @penn201500 does not work for me, still have the issue.

@LZGH
Copy link

LZGH commented Jul 18, 2017

@paddyhoran That doesn't work for me too. I sovle it by revise anaconda-mode.el source file,find "(add-hook 'anaconda-mode-response-read-fail-hook 'anaconda-mode-show-unreadable-response)" and remove it,then you need to recompile anaconda-mode.el or delete anaconda-mode.elc directly,then it worked.

@paddyhoran
Copy link

@LZGH, thanks very much. That worked.

@shivams
Copy link

shivams commented Oct 3, 2017

Instead of localhost, try 127.0.0.1 for no_proxy. This worked for me.

@proofit404
Copy link
Contributor

Error messages are not propagated to windows anymore.

Deewiant added a commit to Deewiant/emacs.d that referenced this issue Sep 1, 2019
In particular pythonic-emacs/anaconda-mode#164 is
making Anaconda unusable right now. Based on quick testing Elpy seems to
be nicer in general too. Plus it's so commonly used that Googling
related to it should be easier.
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