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.anaconda_lib.workers.local_worker.LocalWorker object > initial check failed #527

Closed
wqshen opened this issue Sep 2, 2016 · 107 comments

Comments

@wqshen
Copy link

wqshen commented Sep 2, 2016

this message appears at each Sublime startup, how to fix it?
failed

@DamnWidget
Copy link
Owner

DamnWidget commented Sep 2, 2016

First of all, did you try to do what the error says?
Second, is anaconda working normally after show that error?
Third, which version of anaconda are you actually using?
Operating System? Sublime Build? Logs?

Is really hard to help someone that doesn't provide any kind of information, don't you think so?

@RafaAguilar
Copy link

Hi @DamnWidget, I'm having same error on on Linux, I followed the steps and check the anaconda.sock file was created and a Python process is running:

user      7011  0.1  0.3 135152 24316 ?        Sl   11:50   0:00 /home/user<path>/venv/bin/python -B /home/rafa/.config/sublime-text-3/Packages/Anaconda/anaconda_server/jsonserver.py -p curated -e /home/user/path-tp-app 6974

And there is a sock file:

srwxrwxr-x 1 rafa rafa 0 sep  2 11:51 /home/rafa/.local/share/anaconda/run/pp/anaconda.sock=

The only thing I see different is the equal (=) at the end, but don't know if this is expected.

@traversw
Copy link

traversw commented Sep 3, 2016

I'm on the latest version of Anaconda (2.0.7) and also getting the error @wqshen posted when I start up Sublime Text with a python file open in the editor. After the first error, the problem goes away and Anaconda works fine.

This from my anaconda_jsonserver.log. Not sure if it's related.

2016-09-03 14:39:49,437: DEBUG : bind: address=('localhost', 49677)
2016-09-03 14:39:49,437: DEBUG : listen: backlog=5
2016-09-03 14:39:49,437: INFO : Anaconda Server started in 49677 for PID 5104 with cache dir C:\Users\Travers\AppData\Roaming\Jedi\Jedi\Training and extra paths C:\Users\Travers\Jared\Training
2016-09-03 14:39:54,606: INFO : Incomming connection from ('127.0.0.1', 49685)
2016-09-03 14:39:54,606: INFO : Incomming connection from ('127.0.0.1', 49686)
2016-09-03 14:39:54,621: INFO : client requests: lint
2016-09-03 14:39:54,637: INFO : About push back to ST3: b'{"errors": [], "success": true, "uid": "abc98c9400394e7c8ac82cf11e4b81c0", "vid": 15}\r\n'
2016-09-03 14:39:54,978: ERROR : Traceback (most recent call last):
File "C:\Users\Travers\AppData\Roaming\Sublime Text 3\Packages\Anaconda\anaconda_server\jsonserver.py", line 338, in
if WINDOWS:
File "C:\Users\Travers\AppData\Roaming\Sublime Text 3\Packages\Anaconda\anaconda_server\jsonserver.py", line 145, in init
File "C:\Program Files\Python35\lib\asyncore.py", line 329, in bind
return self.socket.bind(addr)
OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
2016-09-03 14:39:54,979: ERROR : [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
2016-09-03 14:40:18,013: INFO : client requests: lint
2016-09-03 14:40:18,013: INFO : About push back to ST3: b'{"errors": [], "success": true, "uid": "1901eddf51db4f9c813cda1a48e1b56e", "vid": 15}\r\n'

@DamnWidget
Copy link
Owner

Duplicate of #514

This happens because your systems, for whatever reason, are not able to connect to localhost during 2 seconds for N tries with 0.2s timeout each, that is abnormal, your systems would be able to connect to the loopback interface/unix socket domain in less than 0.2s always. In fact I have never been able to replicate this issue even using a timeout of 0.001s.

About the error that @traversw pasted, it is because there is already a JsonServer running and ST3 being unable to connect is asking to start it again (that is weird as well).

@RafaAguilar the socket name should not have any equal symbol on it, can you double check it?

@tanpv
Copy link

tanpv commented Sep 8, 2016


Sublime Text

<Anaconda.anaconda_lib.workers.local_worker.LocalWorker object at 0x000001EA4B464FD0> initial check failed because:

connection to localhost:51568 timed out after 0.2s. tried to connect 7 times during 2 seconds

check that there is Python process executing the anaconda jsonserver.py script running in your system. If there is, check that you can connect to your localhost writing the following script in your Sublime Text 3 console:

import socket; socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect(("localhost", 51568))


OK

Got same error in my machine, after close message, it continue to work fine.

@danielgusland
Copy link

+1 for this issue. I'm running windows 10 64 bit.

@Tomvass
Copy link

Tomvass commented Sep 9, 2016

I had this issue over the past few days and managed to fix it by changing my build system to the default Anaconda Python Builder. Running the command in the sublime terminal import socket; socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect(("localhost", 51017)) was working fine but I forgot to change my build system from javac back to python.

@DamnWidget
Copy link
Owner

Interesting... I am not sure what the build system has to do with anaconda JsonServer startup but I will make some deeper investigation as this piece of information from @Tomvass looks like can lead us to find some kind of weird hidden bug into the new anaconda's startup logic.

@Tomvass
Copy link

Tomvass commented Sep 9, 2016

No idea, could just be a quirk with my system and not directly related to this issue but matched mine closely enough. Always got the error on startup and Autoformat PEP8 was failing with the following:

Calback 1219acd2d0944a78acc8068ff40ab411 came back with data but it's status was timed_out already
INFO:Anaconda.anaconda_lib.callback:Calback 1219acd2d0944a78acc8068ff40ab411 came back with data but it's status was timed_out already

Changing my build system now doesn't seem to be able to reproduce it so might of just been a coincidence and gave something a sufficient kick to start things running as normal again.

@DamnWidget
Copy link
Owner

I did some deeper investigation into this and there is no link between the build system and some people systems being slow enough to connect their localhost as to raise this error.

I just added a new configuration setting that anyone could use to disable the startup warnings (they still get logged into the ST3 console).

/*
    Set this option to true if you get warnings about anaconda not
    being able to connect to your localhost on ST3 startup but it
    works normally after closing the error message.

    NOTE: Ignore errors is dangerous do it under your own responsibility
 */
"swallow_startup_errors": false

As the note in the comment says, use it at your own discretion. It will be part of the package in version 2.0.8

@Gabriel-p
Copy link

Same here:

<Anaconda.anaconda_lib.workers.local_worker.LocalWorker object at 0x7f5f2ed8f0d0> initial check failed because:

can not connect to /home/gabriel/.local/share/anaconda/run/photom/anaconda.sock. tried to connect 21 times during 2 seconds

check that there is Python process executing the anaconda jsonserver.py script running in your system. If there is, check that the Unix Domain Socket file /home/gabriel/.local/share/anaconda/run/photom/anaconda.sock exists and that you can connect to it writing the following script in your Sublime Text 3 console:

import socket; socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect(/home/gabriel/.local/share/anaconda/run/photom/anaconda.sock)

If anaconda works just fine after you received this error and the command above worked you can make anaconda to do not show you this error anymore settig the 'swallow_startup_errors' to 'true' in your configuration file.

I'm using pyenv+virtualenv and I get this quite often. After restarting sublime the pop-up does not show again.

@crc32
Copy link

crc32 commented Sep 25, 2016

anacondaST3: ERROR - <Anaconda.anaconda_lib.workers.local_worker.LocalWorker object at 0x10ceb4f90> initial check failed because:

unexpected exception: [Errno 2] No such file or directory. tried to connect 21 times during 2 seconds

check that there is Python process executing the anaconda jsonserver.py script running in your system. If there is, check that the Unix Domain Socket file /Users/crc32/Library/Application Support/Anaconda/anaconda-2/anaconda.sock exists and that you can connect to it writing the following script in your Sublime Text 3 console:

import socket; socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect(/Users/crc32/Library/Application Support/Anaconda/anaconda-2/anaconda.sock)

If anaconda works just fine after you received this error and the command above worked you can make anaconda to do not show you this error anymore settig the 'swallow_startup_errors' to 'true' in your configuration file.

import socket; socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect(/Users/crc32/Library/Application Support/Anaconda/anaconda-2/anaconda.sock)

File "", line 1
import socket; socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect(/Users/crc32/Library/Application Support/Anaconda/anaconda-2/anaconda.sock)
^
SyntaxError: invalid syntax

The carat is pointing at the first / in the directory.

Since receiving that error, Anaconda does not function in any way.

I've checked, and the directory needed does exist, but the .sock file does not. I've made the directory world writable (a+rwx), and still nothing. Then, trying the code line, get the invalid syntax error.

Any ideas? It used to work, but broke a few months ago. System is macOS Sierra, but the issue was also present on ElCap. Also, it appears that the jsonserver.py isn't loading, but I don't know how to address that.

I've also tried uninstalling and reinstalling Anaconda, to no effect.

@DamnWidget
Copy link
Owner

Is there any anaconda Python JsonServer in the system? (ps aux | grep jsonserver). Try to stop ST3 and kill any stuck anaconda's JsonServer then start ST3 again.

Looks like the Unix Domain Sockets are giving us some logistical problems, probably we will get rid of them in next releases.

@crc32
Copy link

crc32 commented Sep 25, 2016

Is there any anaconda Python JsonServer in the system? (ps aux | grep jsonserver). Try to stop ST3 and kill any stuck anaconda's JsonServer then start ST3 again.

Entirety of output of ps aux | grep jsonserver:

UserXXX 68849 0.0 0.0 2432804 1984 s000 S+ 1:41PM 0:00.00 grep --color=always jsonserver

Nope, there do not appear to be any jsonserver processes running.

@jayktaylor
Copy link

I've gotten this issue a lot over recent versions of Anaconda, I didn't get it up until a few weeks ago. Works completely fine after closing the dialog box. Setting swallow_startup_errors to true doesn't actually seem to do anything to stop it from displaying the error too, which is odd.

@urvil
Copy link

urvil commented Sep 26, 2016

please find below the solution if you are using python34(3.4) or above.
check your python version: goto command prompt and type "python" hit enter and the first line you get is your python version.

  1. goto path "C:\Users\user-name\AppData\Roaming\Sublime Text 3\Packages\Anaconda\anaconda_lib\linting\pyflakes"

  2. Open file named checker.py

  3. search for word LOOP_TYPES in the file(probably in first 80 lines) which is looks like as below if its latest version of anaconda.

    if PY34:
    LOOP_TYPES = (ast.While, ast.For)
    else:
    LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)

  4. replace above 4 lines with the below shown 4 lines.

    if PY2 or PY32 or PY33:
    LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)
    else:
    LOOP_TYPES = (ast.While, ast.For)

  5. restart your sublime.

@DamnWidget
Copy link
Owner

DamnWidget commented Sep 26, 2016

I would never recommend to modify PyFlakes library if you don't know the implications of what you are doing, btw, I don't see the relation between that and the system being too slow as to start a JsonServer and connect to it.

Can you try to explain it please?

P.S: btw, that change totally breaks PyFlakes support in Python 2 so please, don't use it

@jeffery9
Copy link

jeffery9 commented Sep 30, 2016

sublime text build 3126
anaconda 2.1.0
python 2.7.11

show this error every startup sublime text. the following error logged in log file.

2016-09-30 23:13:15,348: ERROR : Traceback (most recent call last):
File "C:\Users\w541\AppData\Roaming\Sublime Text 3\Packages\Anaconda\anaconda_server\jsonserver.py", line 337, in
server = JSONServer(('localhost', port))
File "C:\Users\w541\AppData\Roaming\Sublime Text 3\Packages\Anaconda\anaconda_server\jsonserver.py", line 154, in init
self.bind(self.address)
File "C:\Python27\Lib\asyncore.py", line 342, in bind
return self.socket.bind(addr)
File "C:\Python27\Lib\socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
error: [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted

2016-09-30 23:13:15,348: ERROR : [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
2016-09-30 23:14:32,729: INFO : process 16564 does not exists stopping server...
2016-09-30 23:14:33,736: INFO : Closing the socket, server will be shutdown now...

@DamnWidget
Copy link
Owner

That looks like Windows TCP/IP port exhaustion. Do you know how many instances of anacondas's JsonServer were in the system? Btw, which windows version?

@jeffery9
Copy link

jeffery9 commented Oct 1, 2016

windows 10 64 bit.
have no idea how to detect how many jsonserver instance running. thanks.

full log

2016-10-01 11:56:14,463: INFO : process 1780 does not exists stopping server...
2016-10-01 11:56:15,466: INFO : Closing the socket, server will be shutdown now...
2016-10-01 11:56:28,779: DEBUG : bind: address=('localhost', 57690)
2016-10-01 11:56:28,782: DEBUG : listen: backlog=5
2016-10-01 11:56:28,782: INFO : Anaconda Server started in 57690 for PID 6972 with cache dir C:\Users\w541\AppData\Roaming\Jedi\Jedi\odoo and extra paths E:odoo,E:project,E:\codebase\server-tools
2016-10-01 11:56:33,311: INFO : Incomming connection from ('127.0.0.1', 57698)
2016-10-01 11:56:33,312: INFO : Incomming connection from ('127.0.0.1', 57699)
2016-10-01 11:56:33,338: INFO : client requests: lint
2016-10-01 11:56:35,255: INFO : About push back to ST3: {"vid": 15, "errors": [{"regex": "((and|or|not|if|elif|while|in)\s+|[+-
^%%<>=({])
\s_(?P[\w.]response[\w])", "level": "W", "raw_error": "local variable 'response' is assigned to but never used", "len": 8, "lineno": 121, "offset": 8, "message": "Local variable %r is assigned to but never used", "underline_range": false}, {"regex": "(^|\s+|,\s_|as\s+)(?P[\w]odoo.exceptions.AccessError[\w])", "linematch": "(from\s+[\w_.]+\s+)?import\s+(?P[^#;]+)", "level": "W", "raw_error": "'odoo.exceptions.AccessError' imported but unused", "lineno": 38, "offset": 0, "message": "%r imported but unused", "underline_range": false}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ','", "lineno": 152, "offset": 22, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ','", "lineno": 152, "offset": 26, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ','", "lineno": 152, "offset": 48, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E122): continuation line missing indentation or outdented", "lineno": 338, "offset": 16, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ','", "lineno": 607, "offset": 29, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ','", "lineno": 654, "offset": 29, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E251): unexpected spaces around keyword / parameter equals", "lineno": 662, "offset": 52, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E251): unexpected spaces around keyword / parameter equals", "lineno": 662, "offset": 54, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ','", "lineno": 714, "offset": 34, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ','", "lineno": 714, "offset": 99, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ':'", "lineno": 717, "offset": 27, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ','", "lineno": 717, "offset": 69, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ','", "lineno": 719, "offset": 90, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ':'", "lineno": 722, "offset": 38, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E203): whitespace before ','", "lineno": 797, "offset": 84, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E303): too many blank lines (2)", "lineno": 1001, "offset": 4, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E241): multiple spaces after ':'", "lineno": 1036, "offset": 21, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E251): unexpected spaces around keyword / parameter equals", "lineno": 1143, "offset": 55, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E231): missing whitespace after ','", "lineno": 1299, "offset": 81, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E303): too many blank lines (2)", "lineno": 1307, "offset": 8, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E701): multiple statements on one line (colon)", "lineno": 1341, "offset": 29, "message": "[w] pep 8 (%s): %s", "underline_range": true}, {"level": "W", "raw_error": "[W] PEP 8 (E261): at least two spaces before inline comment", "lineno": 1377, "offset": 41, "message": "[w] pep 8 (%s): %s", "underline_range": true}], "uid": "e51e90b6faf147959fb5f74da9ca8143", "success": true}

2016-10-01 11:56:36,020: ERROR : Traceback (most recent call last):
File "C:\Users\w541\AppData\Roaming\Sublime Text 3\Packages\Anaconda\anaconda_server\jsonserver.py", line 337, in
server = JSONServer(('localhost', port))
File "C:\Users\w541\AppData\Roaming\Sublime Text 3\Packages\Anaconda\anaconda_server\jsonserver.py", line 154, in init
self.bind(self.address)
File "C:\Python27\Lib\asyncore.py", line 342, in bind
return self.socket.bind(addr)
File "C:\Python27\Lib\socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
error: [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted

2016-10-01 11:56:36,023: ERROR : [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted

On Sat, Oct 1, 2016 at 12:13 AM, Oscar Campos notifications@github.com
wrote:

That looks like Windows TCP/IP port exhaustion. Do you know how many
instances of anacondas's JsonServer were in the system? Btw, which windows
version?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#527 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVuLAvtAzFtSeeYWkB94YYM35_22-aRks5qvTUfgaJpZM4JzncS
.

Jeffery -odoo expert form kunshan, suzhou, china
IM Q913547235

@DamnWidget
Copy link
Owner

It's like your Windows ran out of socket descriptors, in the logs we can see that anaconda is operating normal just linting your code after a lint request so the connection is already established but there is another JsonServer starting up for the same project/folder name.

Are you sure you didn't had two different Sublime Text 3 windows opening the same project/folder?

To check in windows about the JsonSever just open the tasks manager and look for python processes.

@jeffery9
Copy link

jeffery9 commented Oct 2, 2016

there is only one window, but running two process.
animation 0

On Sat, Oct 1, 2016 at 7:21 PM, Oscar Campos notifications@github.com
wrote:

It's like your Windows ran out of socket descriptors, in the logs we can
see that anaconda is operating normal just linting your code after a lint
request so the connection is already established but there is another
JsonServer starting up for the same project/folder name.

Are you sure you didn't had two different Sublime Text 3 windows opening
the same project/folder?

To check in windows about the JsonSever just open the tasks manager and
look for python processes.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#527 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVuLCP26msMVTKcRqwKn67gyFrn8xu2ks5qvkI5gaJpZM4JzncS
.

Jeffery -odoo expert form kunshan, suzhou, china
IM Q913547235

@jeffery9
Copy link

jeffery9 commented Oct 2, 2016

Even open workspace with only one folder which running one sublime
process. It also raise jsonserver error.
animation 1

On Sun, Oct 2, 2016 at 11:06 AM, Jeffery jeffery9@gmail.com wrote:

there is only one window, but running two process.

On Sat, Oct 1, 2016 at 7:21 PM, Oscar Campos notifications@github.com
wrote:

It's like your Windows ran out of socket descriptors, in the logs we can
see that anaconda is operating normal just linting your code after a lint
request so the connection is already established but there is another
JsonServer starting up for the same project/folder name.

Are you sure you didn't had two different Sublime Text 3 windows opening
the same project/folder?

To check in windows about the JsonSever just open the tasks manager and
look for python processes.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#527 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVuLCP26msMVTKcRqwKn67gyFrn8xu2ks5qvkI5gaJpZM4JzncS
.

Jeffery -odoo expert form kunshan, suzhou, china
IM Q913547235

Jeffery -odoo expert form kunshan, suzhou, china
IM Q913547235

@ayushjaiswal
Copy link

I'm facing the same problem on both my systems running macOS Sierra. Setting "swallow_startup_errors" to true doesn't help either.

@jayktaylor
Copy link

I wouldn't mind so much about this 'issue' (Anaconda works fine after the error) if swallow_startup_errors actually worked, as mentioned above. It doesn't actually do anything.

@DamnWidget
Copy link
Owner

That's weird @jaydenkieran and @ayushjaiswal as you can see in the code if swallow_startup_errors is true that line of code that contains the sublime_message trigger will not be executed.

@jeffery9
Copy link

jeffery9 commented Oct 5, 2016

setting swallow_startup_errors to true is not worked for me too.

On Wed, Oct 5, 2016 at 6:40 PM, Oscar Campos notifications@github.com
wrote:

That's weird @jaydenkieran https://github.com/jaydenkieran and
@ayushjaiswal https://github.com/ayushjaiswal as you can see in the code
https://github.com/DamnWidget/anaconda/blob/master/anaconda_lib/workers/worker.py#L57-L59
if swallow_startup_errors is true that line of code that contains the
sublime_message trigger will not be executed.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#527 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVuLGCyuPKkr8ZOCKelhc3oLuWws-odks5qw36rgaJpZM4JzncS
.

Jeffery -odoo expert form kunshan, suzhou, china
IM Q913547235

@DamnWidget
Copy link
Owner

Try with 2.1.1 please

@jeffery9
Copy link

jeffery9 commented Oct 5, 2016

​moved to 2.1.1, it ok now

thanks.

On Wed, Oct 5, 2016 at 8:46 PM, Oscar Campos notifications@github.com
wrote:

Try with 2.1.1 please


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#527 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVuLD7BWWqp9YKzYyd9AkSgNx9CPOTWks5qw5wUgaJpZM4JzncS
.

Jeffery -odoo expert form kunshan, suzhou, china
IM Q913547235

@ayushjaiswal
Copy link

I moved to 2.1.1 too and it works fine for me also.

@laik
Copy link

laik commented Dec 5, 2017

cd ~/.cache/jedi
rm -rf [yourProjectName]
restart sublime

@carljunepiao
Copy link

@laik Can you explain why following that can fix the problem?

@GraveMoon
Copy link

default
把这一段关于时间的检测注释掉如何

@DP2004
Copy link

DP2004 commented Jan 27, 2018

I finally was able to resolve my issue and have been using anaconda successfully for about a month. Based on the previous comments in this thread I assumed it was a problem with my configuration of python and sublime. In order to resolve that I removed anaconda from my plugins, uninstalled sublime, then uninstalled python. After that was done I went through my registry and deleted any key I could find that mentioned python or sublime. After doing that I reinstalled python, then sublime, and added anaconda. Probably a bit overkill but it seemed to work and I have not seen this issue since finishing this process.

@zlatdev
Copy link

zlatdev commented Mar 5, 2018

Hello, Got this issue on latest build, which was installed via Package Control.
Removing the Anaconda, and installing via git clone, resolve the issue.

@DahlitzFlorian
Copy link

I've got this weird error on Sublime startup:

screen shot 2018-05-08 at 20 50 37

I've already run ps aux | grep jsonserver resulting in:

florian          46772   0.0  0.0  4267752    636 s000  R+    9:12PM   0:00.00 grep jsonserver

Reinstalling Anaconda via Package Control didn't help and installing via git clone didn't solve the problem, either.

Environment specifications:
OS macOS High Sierra (version 10.13.4)
Anaconda v2.1.26
Python 3.6.3
ST3 Build 3170

@gagarine
Copy link

Exact same situation than @DahlitzFlorian

@juanromerocortes
Copy link

juanromerocortes commented May 15, 2018

same problem as @DahlitzFlorian
Environment:
Unbuntu 16.04
Anaconda 2.1.26
ST3 Build 3176

I tried to run jsonserver with python -B anaconda_server/jsonserver.py -p test 9999 DEBUG
but it returns

MyPy is enabled but we could not import it
Usage: jsonserver.py -p <project> -e <extra_paths> ST3_PID

so I don't know why jsonserver is not running

@zlatdev
Copy link

zlatdev commented Jun 5, 2018

Hi all, Check access to files in installed folder and in folder ~/.local/share/anaconda
After installation, the owner was root, and therefore i can't write to this folders.

@jeffworne
Copy link

jeffworne commented Aug 8, 2018

I'm on Windows 10 with limited rights to install programs. As such, I'm using a portable version of Sublime and Python. I'm unable to get Anaconda to work due to the fact that jsonserver.py is not running. If I try to run it manually based on @juanromerocortes suggestion, I see:

c:\local\python-3.7\python.exe -B anaconda_server\jsonserver.py -p test 9999 DEBUG
Traceback (most recent call last):
  File "anaconda_server\jsonserver.py", line 28, in <module>

ModuleNotFoundError: No module named 'lib'

EDIT: I was able to fix this issue completely with a proper install of Python on my system and a clean install of sublime text (though this may not have been necessary). I still get the error at startup, but i guess it takes a bit of type for the python interpreter to start the jsonserver.py program.

Hope this helps a couple people down the road.

@dakiefer
Copy link

I had this error message and Anaconda did not work with Ubuntu 16.04, sublime text 3.1.1 build 3176, AnacondaST3 v2.1.29 and Python 3.6.5. When I tried

python -B ~/.config/sublime-text-3/Packages/Anaconda/anaconda_server/jsonserver.py -p test 9999 DEBUG

I got the error message MyPy is enabled but we could not import it. So I installed MyPy

pip install MyPy

and Anaconda started working as expected after relaunch. I am unsure why Anaconda would require mypy.

@DamnWidget
Copy link
Owner

Because you enabled it...

@svmotha
Copy link

svmotha commented Oct 1, 2018

please find below the solution if you are using python34(3.4) or above.
check your python version: goto command prompt and type "python" hit enter and the first line you get is your python version.

  1. goto path "C:\Users\user-name\AppData\Roaming\Sublime Text 3\Packages\Anaconda\anaconda_lib\linting\pyflakes"
  2. Open file named checker.py
  3. search for word LOOP_TYPES in the file(probably in first 80 lines) which is looks like as below if its latest version of anaconda.
    if PY34:
    LOOP_TYPES = (ast.While, ast.For)
    else:
    LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)
  4. replace above 4 lines with the below shown 4 lines.
    if PY2 or PY32 or PY33:
    LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)
    else:
    LOOP_TYPES = (ast.While, ast.For)
  5. restart your sublime.

This change breaks pyflakes in python 2

@svmotha
Copy link

svmotha commented Oct 1, 2018

I've got this weird error on Sublime startup:

screen shot 2018-05-08 at 20 50 37

I've already run ps aux | grep jsonserver resulting in:

florian          46772   0.0  0.0  4267752    636 s000  R+    9:12PM   0:00.00 grep jsonserver

Reinstalling Anaconda via Package Control didn't help and installing via git clone didn't solve the problem, either.

Environment specifications:
OS macOS High Sierra (version 10.13.4)
Anaconda v2.1.26
Python 3.6.3
ST3 Build 3170

Same Issue:
ps aux | grep jsonserver results in:

victor 2609 0.1 0.0 2432804 2052 s002 S+ 4:20PM 0:00.01 grep jsonserver

Environment specifications:
OS macOS Sierra (version 10.12)
Anaconda v2.1.29
Python 2.7.12
ST3 Build 3176

@prvnsingh
Copy link

this message appears at each Sublime startup, how to fix it?
failed

just open the console of sublime text. see the command generating the error like: "import socket; socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect(("localhost", 55557))"
copy it and paste in the console command line and execute. Restart sublime, now it wouldn't pop up the error anymore.

@adsperclick
Copy link

4. if PY2 or PY32 or PY33:
LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)
else:
LOOP_TYPES = (ast.While, ast.For)

Thank you it Works!

@nik1a
Copy link

nik1a commented Nov 16, 2018

Had the same issue. In my case Comodo was the culprit. Comodos HIPS blocked anaconda.py and plugin_host.exe. I had to remove them from the blocked apps list and Hips rules list.

@hobbyistmaker
Copy link

I was recently having this problem, and it was being caused by another package failing in Sublime Text that was causing startup to take too long.

@SockToy
Copy link

SockToy commented Feb 14, 2019

Minor fix to this for me - didnt like swallowing all the errors and not knowing about failures so...

added the following to helpers.py

def get_socket_timeout(default):
    """
    Some systems with weird enterprise security stuff can take a while 
    to return a socket - permit overrides to default timeouts
    """
    return get_settings(active_view(), 'socket_timeout', default)

Changed the following in local_worker.py 33/34

        timeout = get_socket_timeout(0.2)
        interval = timeout * 10;

Can submit a patch if you care, but seemed a little more elegant. Let me set a half second timeout in my user config, which was all that was required.

@yuzhujiutian
Copy link

@jbartolozzi
Copy link

jbartolozzi commented May 20, 2019

I am also having this issue on OSX 10.13.6 with a VPN and Sentinel One installed (work computer).
When I ping localhost i get ~0.1ms.

When I run the json server in debug mode, it works correctly.

@jbartolozzi
Copy link

Just curious if anyone's discovered a workaround for this?

@jbartolozzi
Copy link

fwiw,
#812 (comment)

@Antoine25
Copy link

On my side, i fixed this problem by commenting one line in the file ~/.config/sublime-text-3/Packages/Anaconda/anaconda_server/jsonserver.py .
cf line 158 in anaconda_issue.png.
I know it's not a clean way to fix the problem but it works for me.
anaconda_issue

@tronghieu1987
Copy link

tronghieu1987 commented Jun 11, 2019

I tried many methods mentioned above, but none worked. Luckily somehow Sublime automatically backed up many packages and stored them in the same folder as Packages, so I was able to restore to the working version prior to the issue.

Attached is the Git diff file between the non-working vs working version. Hope it could help.

malfuntionalAnaconda.txt

@karolyi
Copy link
Contributor

karolyi commented Jun 11, 2019

Working on it. Related to #820

@DahlitzFlorian
Copy link

Working on a macOS Mojave 10.14.5 installation, the following solved the problem for me:

  1. Opening ~//Library/Application Support/Sublime Text 3/Packages/Anaconda/anaconda_server/jsonserver.py in vim (or any other editor) - make sure to escape the blanks
  2. Commenting out the three lines shown in the screenshot below

This one is similar to @Antoine25's answer, so thanks a lot!

image

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