Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Request textDocument/hover failed. Message: unknown document #480

Closed
brettcannon opened this issue Dec 11, 2018 · 14 comments
Closed

Request textDocument/hover failed. Message: unknown document #480

brettcannon opened this issue Dec 11, 2018 · 14 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@brettcannon
Copy link
Member

@Ark-kun commented on Mon Dec 10 2018

Environment data

  • VS Code version: 1.28.2
  • Extension version (available under the Extensions sidebar): 2018.11.0
  • OS and version: Debian 9
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.5.3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A

Version: 1.28.2
Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850
Date: 2018-10-17T00:20:56.183Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Expected behaviour

I expect mouse hovers not to cause errors.

Actual behaviour

I get errors on mouse hovers.

Steps to reproduce:

  1. Open any Python file
  2. Point your mouse to any part of the code.

Logs

Repeated many times:

[Error - 5:13:34 PM] Request textDocument/hover failed.
  Message: unknown document
  Code: -32000 
   at Microsoft.Python.LanguageServer.Implementation.ProjectFiles.GetEntry(Uri documentUri, Boolean throwIfMissing)
   at Microsoft.Python.LanguageServer.Implementation.ProjectFiles.GetEntry(TextDocumentIdentifier document, Nullable`1 expectedVersion, ProjectEntry& entry, PythonAst& tree)
   at Microsoft.Python.LanguageServer.Implementation.Server.Hover(TextDocumentPositionParams params, CancellationToken cancellationToken)
   at Microsoft.Python.LanguageServer.Implementation.LanguageServer.Hover(JToken token, CancellationToken cancellationToken)
@Honzys
Copy link

Honzys commented Dec 12, 2018

I have these issues too.

Another way to repro this error is by copy paste selected file in the working tree. Then this error pop ups once in few seconds and it only disappears when I restart vscode.

@MikhailArkhipov MikhailArkhipov self-assigned this Dec 12, 2018
@MikhailArkhipov MikhailArkhipov added bug Something isn't working feature: tooltips labels Dec 12, 2018
@MikhailArkhipov
Copy link

MikhailArkhipov commented Dec 12, 2018

I don't see textDocument/didOpen sent down to the LS.

Basically if LS was restarted by VSC for whatever reason, it is not getting workspace change notifications anymore.

@MikhailArkhipov
Copy link

#452

@linbirg
Copy link

linbirg commented Jan 7, 2019

did this bug solved? I have these issues too and it's boring...

@linbirg
Copy link

linbirg commented Jan 7, 2019

I now solve the problem by kill the LanguageServer proc, but still boring...

@crazythinking
Copy link

I still have this error, and updated newest vscode
版本: 1.31.1
提交: 1b8e8302e405050205e69b59abb3559592bb9e60
日期: 2019-02-12T02:19:29.629Z
Electron: 3.1.2
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.15.0-45-generic

@MikhailArkhipov
Copy link

The fix is not in public builds yet. When we resolve issue it means it was fixed and tested internally. There is a major rework of the language server in progress but it is not yet ready for public release.

@muodov
Copy link

muodov commented Mar 1, 2019

Any workaround for this? (particularly in VS Code)

@MikhailArkhipov
Copy link

Typical case is when new file was created and not saved as *.py and instead, just language was selected. The underlying case is that file does not have disk path/URI.

@muodov
Copy link

muodov commented Mar 2, 2019

Ah, indeed. Thanks!

@Abtektas
Copy link

Abtektas commented Mar 2, 2019

Hello, I got this bug too. I solved from the 'settings.json' . I was using terminal.external.osxExec : gnome-terminal.app and telemetry.enableTelemetry: false . I removed both of them and issue is disappeared for now.
edit: It happened again after 15-20 mins.

@MikhailArkhipov
Copy link

Folding into #597

@MikhailArkhipov MikhailArkhipov removed their assignment Mar 3, 2019
@MikhailArkhipov MikhailArkhipov added duplicate This issue or pull request already exists and removed feature: tooltips labels Mar 3, 2019
@MarkMoretto
Copy link

I solved the issue by reverting back to jedi. This Analysis Engine is the exact reason I don't use Visual Studio 15.0 or 17.0.

Under preferences, you should be able to search for jedi, then click the checkbox under the following section:

Python: Jedi Enabled
    Enables Jedi as IntelliSense engine instead of Microsoft Python Analysis Engine.

@MikhailArkhipov
Copy link

@MarkMoretto - did you use LS 0.1 or 0.2? 0.2 is vastly different from VS. You can try it by setting download to beta channel.

"python.analysis.downloadChannel": "beta"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

8 participants