Sublime Text 3: Anaconda package error connection to localhost timed out

前端 未结 6 2196
孤城傲影
孤城傲影 2021-02-08 16:17

I am getting a bizarre error message when starting up sublime text 3.

upon startup, I get the error below.

Here\'s some background on my system:

<
6条回答
  •  佛祖请我去吃肉
    2021-02-08 16:36

    I had the same problem on OS X and tried almost every solution you can find on the web. the problem seems to be related to a delay in json server response time so that when it exceeds 2 Seconds you get the error.

    there are two possible workarounds:

    first method is by increasing the time out:

    change the line 33 in /anaconda_lib/workers/local_worker.py

    from

    timeout = get_socket_timeout(0.2)
    

    to

    timeout = get_socket_timeout(1)
    

    this should help you with the error by giving a little more time to perform server checks before throwing an error.

    the second method is by changing permissions on anaconda log file to make sure it is owned by your user, as stated by the original contributer:

    Anaconda behaves slowly and jsonserver crashes

    If you are in POSIX systems (Linux or OS X) take a look at the owner of the anaconda's jsonserver log files, they must be owned by your user or the jsonserver would be unable to start up. Log files can be found in:

    GNU/Linux: ~/.local/share/anaconda/logs

    OS X: ~/Library/Logs/anaconda

    Windows: %APPDATA%\Anaconda\Logs

    This is how I was able to resolve the issue:

    1- delete ~/Library/Logs/anaconda directory

    2- run sublime text and open some .py files until anaconda recreates the directory

    3- give read/write permissions to that folder and its sub-directories for every user on your computer (administrator,everyone,etc...)

    there is a good chance you'll have to repeat the steps above every now and then. that's what I do volunteerly before anaconda makes me to do so!

    UPDATE

    I've found that the problem can be caused by VPN connection as well, so that everytime I connect and disconnect this error shows up.

提交回复
热议问题