Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingUriError: View has no URI #2476

Open
giampaolo opened this issue May 15, 2024 · 1 comment
Open

MissingUriError: View has no URI #2476

giampaolo opened this issue May 15, 2024 · 1 comment

Comments

@giampaolo
Copy link

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
@predragnikolic
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants