microsoft / python-language-server

Microsoft Language Server for Python
Apache License 2.0
910 stars 130 forks source link

Unable to find document, Object reference not set to an instance of an object #2168

Closed akaWolf closed 2 years ago

akaWolf commented 2 years ago

Hello.

Sorry for templateless issue, but I think logs are self-described.

I'm trying to start LSP session without any luck.

Here are the logs of the session: https://paste.akawolf.org/view/Q7kUV

You can see "message": "Unable to find document ..." "name": "InvalidOperationException" "name": "NullReferenceException" "message": "Object reference not set to an instance of an object.",

Emacs 27.2 Microsoft Python Language Server version 0.5.59.0 GNU/Linux

OZoneGuy commented 2 years ago

I am having the same problem as well. I am on Arch linux Python 3.10.X

akaWolf commented 2 years ago

Yes I'm at Arch Linux too.

akaWolf commented 2 years ago

ping

erikhu commented 2 years ago

I am having the same problem as well, I am using arch too. The emacs throws this:

Loading /home/user/.spacemacs...done Mark set Spacemacs is ready. Cannot insert ("N" "Forge" forge-dispatch) into magit-dispatch; o not found Setting ‘forge-add-default-bindings’ to nil in ‘evil-collection-forge-setup’. To suppress this message you can set this variable to nil in your init.el file. Loading /home/user/.emacs.d/.cache/recentf...done Skipping check for new version (reason: dotfile) Mark set Package cl is deprecated [yas] Prepared just-in-time loading of snippets successfully. [2 times] [importmagic] Indexed (/home/user/proyectos/python_test) LSP :: Connected to [mspyls:154470/starting]. LSP :: mspyls:154470 initialized successfully in folders: (/home/user/proyectos/python_test) LSP :: Error from the Language Server: Object reference not set to an instance of an object. (Server End Error) [2 times]

mangkoran commented 2 years ago

Encountered the same issue too. Environment is Arch Linux in WSL2. Client is Emacs 29.

akaWolf commented 2 years ago

solve the issue by running «rm -rf ~/.emacs.d/.cache/lsp/mspyls/» try it, guys, hope it will help.

akaWolf commented 2 years ago

hello.

got the same issue at latest MacOS.

removing ~/.emacs.d/.cache/lsp/mspyls/ doesn't help

rkachach commented 2 years ago

removing ~/.emacs.d/.cache/lsp/mspyls/ fixed the issue for me. Thanks for the tip :+1:

judej commented 2 years ago

Thank you for the report. This project is no longer active. If you are using the Python language server in VSCode, the language server you are using is Pylance and please the http://github.com/microsoft/pylance-release to report issues.

If you are using Visual Studio, then, please use http://github.com/microsoft/PTVS to report issues.

thank you