This repository was archived by the owner on Feb 28, 2022. It is now read-only.
forked from mongodb/snooty-parser
-
Notifications
You must be signed in to change notification settings - Fork 4
This repository was archived by the owner on Feb 28, 2022. It is now read-only.
Assertion error in parser.py on every update #40
Copy link
Copy link
Open
Description
With the latest versions of VSCode and the restructuretext extension on either python 3.9 or 3.10, when editing rst-files the output window pops up for snooty language client, showing a continuous stream of assertion errors.
MacOS 12.1
Python 3.10.1 64-bit
VSCode 1.63.2
reStructuredText v168.0.0
snooty-lextudio 1.11.6
INFO:snooty.language_server:Updating /Users/someuser/Develop/MyProject/SomeDir/SomeFile.rst
ERROR:pyls_jsonrpc.endpoint:Failed to handle request 201
Traceback (most recent call last):
File "/Users/someuser/.local/share/virtualenvs/MyVenv-30Gdics-python/lib/python3.10/site-packages/pyls_jsonrpc/endpoint.py", line 113, in consume
self._handle_request(message['id'], message['method'], message.get('params'))
File "/Users/someuser/.local/share/virtualenvs/MyVenv-30Gdics-python/lib/python3.10/site-packages/pyls_jsonrpc/endpoint.py", line 182, in _handle_request
handler_result = handler(params)
File "/Users/someuser/.local/share/virtualenvs/MyVenv-30Gdics-python/lib/python3.10/site-packages/pyls_jsonrpc/dispatchers.py", line 23, in handler
return method(**(params or {}))
File "/Users/someuser/.local/share/virtualenvs/MyVenv-30Gdics-python/lib/python3.10/site-packages/snooty/language_server.py", line 484, in m_text_document__completion
return self.completions(textDocument["uri"], position)
File "/Users/someuser/.local/share/virtualenvs/MyVenv-30Gdics-python/lib/python3.10/site-packages/snooty/language_server.py", line 460, in completions
line_content = self.project.get_line_content(filePath, position["line"])
File "/Users/someuser/.local/share/virtualenvs/MyVenv-30Gdics-python/lib/python3.10/site-packages/snooty/parser.py", line 1712, in get_line_content
return self._project.get_line_content(path, line)
File "/Users/someuser/.local/share/virtualenvs/MyVenv-30Gdics-python/lib/python3.10/site-packages/snooty/parser.py", line 1375, in get_line_content
page = self.pages[fileid]
File "/Users/someuser/.local/share/virtualenvs/MyVenv-30Gdics-python/lib/python3.10/site-packages/snooty/parser.py", line 1157, in __getitem__
assert not self.__changed_pages
AssertionError
INFO:snooty.language_server:Updating /Users/someuser/Develop/MyProject/SomeDir/SomeFile.rst
[Error - 9:57:49 PM] Request textDocument/completion failed.
Message: AssertionError
Code: -32602
[object Object]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels