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

Assertion error in parser.py on every update #40

Open
onemanifest opened this issue Jan 24, 2022 · 1 comment
Open

Assertion error in parser.py on every update #40

onemanifest opened this issue Jan 24, 2022 · 1 comment

Comments

@onemanifest
Copy link

onemanifest commented Jan 24, 2022

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]
@DmitrySokolov
Copy link

The same.

Version: 1.63.2 (system setup)
OS: Windows_NT x64 10.0.19044

reStructuredText v168.0.0

Python 3.9.6

rstcheck==3.3.1
snooty-lextudio==1.11.6
Sphinx==4.4.0

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

No branches or pull requests

2 participants