Sublime Forum

anacondaST3: ERROR - Anaconda worker could not start

#1

Hello,

why do I get the message below?
If I start the jsonserver manually as described in the message it works fine.
I am working on Windows 10, version 1909, Build 18363.1256

anacondaST3: ERROR - Anaconda worker could not start because:

connection to localhost:9999 timed out after 0.2s. tried to connect 7 times during 2.0 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ā€, 9999))

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 setting the ā€˜swallow_startup_errorsā€™ to ā€˜trueā€™ in your configuration file.
error: Anaconda worker could not start because:

connection to localhost:9999 timed out after 0.2s. tried to connect 7 times during 2.0 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ā€, 9999))

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 setting the ā€˜swallow_startup_errorsā€™ to ā€˜trueā€™ in your configuration file.
Package Control: No updated packages
anacondaST3: ERROR - Anaconda worker could not start because:

connection to localhost:9999 timed out after 0.2s. tried to connect 7 times during 2.0 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ā€, 9999))

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 setting the ā€˜swallow_startup_errorsā€™ to ā€˜trueā€™ in your configuration file.
ā€¦last message repeated one more time in the last 10s

0 Likes

#2

I get the same error.

I have no clue about how I can ā€œcheck that there is Python process executing the anaconda jsonserver.py script running in your system.ā€

Any help is very welcome.

In case I finally canĀ“t make it work, any other packages alternatives for having Sublime Text behaving a bit like PyCharm?

Many thanks.

0 Likes

#3

I donā€™t use anything Anaconda related, but perhaps you want to try:

You need to install both (in that order); that would give you IDE-like powers similar to what VSC provides. Iā€™ve never used PyCharm so Iā€™m not sure what it might do that VSC doesnā€™t, but it might provide a good starting point.

1 Like

#4

Many thanks for your answer.

Have followed your instructions, but unfortunately, it doesnĀ“t work.

I get some minor new color error hints on the left side, but nothing else.
No show over pop upsā€¦ No suggested methods for each classā€¦ No text explaining errorsā€¦ No nothingā€¦
Definitely nothing similar to what is shown in the gif on the LSP pageā€¦ (That would be great)

Is there anything else I have to do for making it work?

Many thanks.

0 Likes

#5

I donā€™t think anything extra is required to get things working (though maybe you want to play with configs to dial in behaviours or what have you later).

Out of the box, you should see things like:

  • If you import a library that doesnā€™t exist, it gets a red error mark under it
  • If you import a symbol from a library that doesnā€™t exist, it gets a dotted underline
  • Obviously broken code should have a red underline and a red circled x in the gutter
  • Hovering over any of those things should show you a popup with the message
  • LSP - Toggle Diagnostics Panel from the command palette (or the key you see listed when you do that) toggles a panel with a list of all problems
  • When you call methods or functions, a popup shows you the expected arguments

and so on.

Do you see any errors in the Sublime console?

0 Likes

#6

Many thanks.

Somehow I managed to make it work.
DonĀ“t really know howā€¦
IĀ“ve installed a LSP-json fileā€¦ (as recommended in the documentatin)
On seeing it didnĀ“t work, I also installed LSP-pylspā€¦
I have gone to Command palette and do ā€œLSP: Restart serverā€.
And that did the trick (sorry, my programming skills are limited :slight_smile: )

Now I think I get most of its functionality except all the info of the functions, specially the built-in functions.

I mean, for instance, when typing ā€œrange()ā€ or ā€œprint()ā€ a box with all the syntaxis, definitions and explanaitions should appear. Like this:
https://diegomerinotraducciones.com/wp-content/uploads/2024/09/image.jpg

If I select it in the suggestions, I get a ā€œMoreā€ button on the bottom, and if I click it, this info appears.

Would it be possible for it to appear automatically while writing?

Many thanks once again.
I am getting there!!! :slight_smile:

0 Likes

#7

In the LSP web it says:

To show the documentation popup you can click the More link in the bottom of the autocomplete, or you can use the default sublime keybinding F12 to trigger it.

So I think I am referring to this.
IĀ“ve been trying to find this feature in the settings, but no success.

F12 certainly works, but is there any variable I can use for getting this behaviour (automatically show that documentation popup?)

Many thanks.

0 Likes

#8

I use LSP-pyright and not LSP-pylsp for Python code; when I type print() as soon as the cursor ends up in the center of the (), this appears:

If you also installed LSP-pylsp in addition to LSP-pyright, perhaps they are competing and you just need to remove LSP-pylsp and then restart Sublime so that only one of them is running?

Or possibly pylsp has some configuration option you can turn on to make it show more information, but Iā€™m not very familiar with it. pyright is the LSP server that e.g. VSC uses for its Python, so it may behave differently.

I think there is a key binding that you can use to summon extra information as well, but Iā€™m not sure what it is offhand and thatā€™s probably less useful than it could be anyway.

0 Likes

#9

Removing LSP-pylsp did the trick!!
Many thanks for your help!

2 Likes