LSP icon indicating copy to clipboard operation
LSP copied to clipboard

MissingUriError: View has no URI

Open giampaolo opened this issue 1 year ago • 1 comments

Describe the bug

I sometimes get this by quickly switching between projects many times.

LSP-pyright: INFO: Using python path "/usr/bin/python3"
git: untracking working dir /home/giampaolo/svn/neato/tron
('--project', '/home/giampaolo/.config/sublime-text/Packages/User/Projects/dotfiles.sublime-project')
git: tracking working dir /home/giampaolo/svn/dotfiles
Traceback (most recent call last):
  File "/home/giampaolo/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/types.py", line 130, in run
    f()
  File "/home/giampaolo/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/documents.py", line 811, in _do_highlights_async
    params = cast(DocumentHighlightParams, text_document_position_params(self.view, point))
  File "/home/giampaolo/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/views.py", line 267, in text_document_position_params
    return {"textDocument": text_document_identifier(view), "position": position(view, location)}
  File "/home/giampaolo/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/views.py", line 225, in text_document_identifier
    uri = uri_from_view(view_or_uri)
  File "/home/giampaolo/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/views.py", line 218, in uri_from_view
    raise MissingUriError(view.id())
LSP.plugin.core.views.MissingUriError: View 658 has no URI

To Reproduce

Not clear

Environment:

  • OS: Ubuntu 22.04
  • Sublime Text version: 4175
  • LSP version: 2.0.1
  • Language servers used: LSP pyright, bash, json

giampaolo avatar May 15 '24 16:05 giampaolo

Did you experience the error when:

  • Closing the file
  • Opening the file
  • Changing the file

How did this issue affect you?

  • Did the language server crashed after this error?
  • Or did it just continue to run?
  • Or it didn't affect you, you continued to use LSP after that error without any issues

predragnikolic avatar May 20 '24 15:05 predragnikolic

If you happen to reopen this issue, please do provide a way to reproduce the issue. Closing due to no response.

predragnikolic avatar Apr 09 '25 18:04 predragnikolic