ide-python icon indicating copy to clipboard operation
ide-python copied to clipboard

pyls initializing for ... forever again

Open mic-rigaud opened this issue 6 years ago • 57 comments

Hello,

Since the new maj (1.0.0) I got the same problem explain here: https://github.com/lgeiger/ide-python/issues/85

However the problem seems different. The solution doesn't work and the error message in debug mode is different too. The command "pyls --help" works.

I use Atom Editor v1.25.1, and ide-python 1.0.0

pyls

Thank you,

mic-rigaud avatar Jun 07 '18 17:06 mic-rigaud

Have you updated the language server to 0.19?

lgeiger avatar Jun 07 '18 17:06 lgeiger

Yes I do: python-language-server in /usr/local/lib/python3.5/dist-packages (0.19.0) future>=0.14.0 in /usr/local/lib/python3.5/dist-packages (from python-language-server) (0.16.0) jedi>=0.12 in /usr/local/lib/python3.5/dist-packages (from python-language-server) (0.12.0) pluggy in /usr/local/lib/python3.5/dist-packages (from python-language-server) (0.6.0) parso>=0.2.0 in /usr/local/lib/python3.5/dist-packages (from jedi>=0.12->python-language-server) (0.2.1)

mic-rigaud avatar Jun 07 '18 18:06 mic-rigaud

Does python -m pyls --help work?

lgeiger avatar Jun 07 '18 20:06 lgeiger

Yes it works. It responds:

usage: __main__.py [-h] [--tcp] [--host HOST] [--port PORT]
                   [--log-config LOG_CONFIG | --log-file LOG_FILE] [-v]

Python Language Server

optional arguments:
  -h, --help            show this help message and exit
  --tcp                 Use TCP server instead of stdio
  --host HOST           Bind to this address
  --port PORT           Bind to this port
  --log-config LOG_CONFIG
                        Path to a JSON file containing Python logging config.
  --log-file LOG_FILE   Redirect logs to the given file instead of writing to
                       stderr.Has no effect if used with --log-config.
  -v, --verbose         Increase verbosity of log output, overrides log config
                        file

mic-rigaud avatar Jun 07 '18 20:06 mic-rigaud

I was having problems but everything worked after uninstalling the python-language-server then flake8 then reinstalling both

MilkyHearts avatar Jun 08 '18 08:06 MilkyHearts

I already reinstall all... :'(

mic-rigaud avatar Jun 08 '18 17:06 mic-rigaud

Is it possible to install the version 0.10.0 on atom? --> Ok I did it. And everything work fine with this version

mic-rigaud avatar Jun 08 '18 18:06 mic-rigaud

With
atom 1.27.2
ide-python 1.0.0
python 3.6.3

After update ide-python on 1.0.0
I have the symbol pyls initiallizing for myfile at the bottom of atom that was spinning all the time

After

sudo pip3 uninstall pydocstyle
sudo pip3 uninstall pyflakes
sudo pip3 uninstall python-language-server
sudo pip3 install python-language-server[all]  

It's ok ...

Actually

  • pydocstyle 2.1.1
  • pyflakes 2.0.0
  • python-language-server 0.19.0

are necessary, i had

  • pydocstyle 2.1.1
  • pyflakes 1.6.0
  • python-language-server 0.13.0

Patlol avatar Jun 08 '18 20:06 Patlol

Didn't work for me. But i have atom 1.25.1, maybe the problem come from my version of atom...

mic-rigaud avatar Jun 08 '18 20:06 mic-rigaud

maybe, update !

Patlol avatar Jun 08 '18 21:06 Patlol

I update my version of atom to 1.27.2, and nothing change. :'( The version 1.0.0 of ide-python doesn't work and the version 0.10.0 works..

mic-rigaud avatar Jun 09 '18 17:06 mic-rigaud

People who are having issues - how many of you are using virtualenv? I was previously using pyls installed with pipsi. With the new configuration I now have to install pyls into each different venv.

ediphy-azorab avatar Jun 11 '18 11:06 ediphy-azorab

@ediphy-azorab Same issue.

georgreen avatar Jun 12 '18 09:06 georgreen

I guess this is the same error

screen shot 2018-06-11 at 3 07 11 pm

after I updated to ide-python 1.0.0.

paulnikolaus avatar Jun 12 '18 09:06 paulnikolaus

@paulnikolaus Plus one to that, I'm experiencing the same when I activate my virtualenv.

georgreen avatar Jun 12 '18 10:06 georgreen

@paulnikolaus I made it work by setting the Python executable to python3 in the ide-python settings. I installed pls for Python 3.6.5 on macOS 10.13.4 using pip3 install python-language-server[all]. I don't use a virtual env though.

tnesztler avatar Jun 12 '18 11:06 tnesztler

@thibeco I've totally overlooked this, thank you so much!

paulnikolaus avatar Jun 12 '18 11:06 paulnikolaus

For those of you working with different python, conda and pip versions on a single machine like me (Windows 10 with anaconda, conda + Cygwin with it's own python and pip versions) make sure that your paths are set correctly. For me the upgrade to ide-python 1.0.0 reset the path entry in the settings to the default (python) which apparently broke pyls functionality (although I'm still not quite sure why, as I have pyls installed in all available python versions). After resetting the path to my anaconda python version (C:\Users\m.langiu\AppData\Local\Continuum\anaconda3\python.exe), everything worked again.

mlangiu avatar Jun 13 '18 09:06 mlangiu

I have atom 1.27.2 with ide-python 1.0.0 on Fedora 28. The python ide used to work as a charm, then it broke (not exactly sure when... maybe after the last ide-python update).

I followed the recommendation by @Patlol (uninstall pyflakes, pydocstyles,...) then install python-language-server[all].

Now I have Successfully installed pydocstyle-2.1.1 pyflakes-2.0.0 python-language-server-0.19.0 but the "pyls initializing for ..." is still going on revolving and I have no functionality from python-ide.

Edit: I installed the previous version of ide-python with: apm install [email protected] And it works perfectly again. So I'd conclude that the issue is with the new version of the ide-python package.

I'm available to help in debugging (mostly by collecting debug info) if it's needed.

Edit 2: I also had the chance to test this on a different machine: Ubuntu 16.04, Atom 1.27.2, all dependencies met, etc. There everything work as a charm with the latest ide-python (1.0.0).

Edit 3: yet another machine, yet another pyls-related issue. This time it's a laptop with Ubuntu 16.04, with the same dependencies fulfilled as in 'Edit 2', but on this machine I had to roll back to ide-python 0.10.0, otherwise I had the same error reported by @paulnikolaus above ("Unable to start Python language server") and I also have some strange graphic issue (Atom makes white flashes all the time). As soon as I installed back the 0.10.0 of ide-python, everything works well again, including (and this I can't explain) the graphic.

mzannoni avatar Jun 14 '18 10:06 mzannoni

@mzannoni Regarding Fedora 28, I was having the exact same issue as you but was able to fix it by rolling back to v0.10.0, manually editing config.cson (File -> Edit -> Config...) and changing any occurrences of 'python3' to '/usr/bin/python3', and then upgrading to v1.0.0.

I had previously tried just changing this in the ide-python settings menu but it didn't fix the issue. This is why I mentioned the full sequence of events I followed to fix it, because there may be more at play here than I understand.

jasampson avatar Jun 21 '18 15:06 jasampson

No improvement after updating to Atom 1.28.0. I tried to update ide-python to 1.0.0, but then it didn't work, same symptoms: pyls initilizing and spinning forever. I installed back the 0.10.0, as before, and it works perfectly again.

mzannoni avatar Jun 22 '18 06:06 mzannoni

I am experiencing the same problem with version 1.0 on macOS, Atom 1.28.0, atom-ide-ui 0.12.0. I did the rollback to version 0.10.0 as previous users suggested and it is now working.

cdeeran avatar Jul 02 '18 05:07 cdeeran

for me it also helped to switch ide-python to python3 (fresh Fedora28) having pyls installed locally pip3 install python-language-server[all] --user

gtema avatar Jul 10 '18 06:07 gtema

Does it even work with Python2? I don't know where ide-python gets the python exec, but I assume it's python3. I have both installed in my machine, with the command 'python' alised to python 3. Moreover, if I run 'python2 -m pyls --help' in a terminal nothing happens, while if is do 'python3 -m pyls --help' the output is the expected one.

Anyhow... I'm still convinced ide-python is the issue in my case. I tried to update it again, after the latest update to Atom 1.28.1, but still the same. I rolled back to ver 0.10.0 and ide-python works great again.

mzannoni avatar Jul 10 '18 07:07 mzannoni

if I run 'python2 -m pyls --help' in a terminal nothing happens

That's probably because you haven't installed it for this version of Python

lgeiger avatar Jul 10 '18 07:07 lgeiger

Well, actually that would return: /usr/bin/python2: No module named pyls

Like: $ python2 -m pylss --help /usr/bin/python2: No module named pylss

And it is installed (checked under ...../python2.7/site-package/pyls). If I open a python2 interpreter and 'import pyls' it works.

However... does version 1.0 of ide-python need to run on python2?

mzannoni avatar Jul 10 '18 08:07 mzannoni

And it is installed (checked under ...../python2.7/site-package/pyls). If I open a python2 interpreter and 'import pyls' it works.

Can you verify that you have pyls version 0.19.0 or newer installed in python 2?

lgeiger avatar Jul 10 '18 09:07 lgeiger

In python 3 the version installed was 0.19. In python 2 it was actually 0.8. So, I've updated it also for python 2, with all dependencies, but this didn't help. Version 0.10.0 works, version 1.0 does not, with same symptoms.

mzannoni avatar Jul 10 '18 09:07 mzannoni

It seems I found a solution, which is probably Fedora-related, that seems to work.

I changed in atom.desktop launcher the executable for Atom from /usr/share/atom/atom to /usr/bin/atom and now ide-python seems to work reliably.

I'm not sure what's the difference between the 2 executable.

Maybe somebody knows or can point to somewhere appropriate, I guess...

mzannoni avatar Jul 10 '18 11:07 mzannoni

Downgraded to 0.10.0 as well. @lgeiger can you give a full explanation of how to actually upgrade to 1.0.0 without this breaking?

Your lines in the newest release do not give much insight. Thanks!

alanzzhao-toast avatar Jul 19 '18 15:07 alanzzhao-toast