openlawlibrary/pygls

AttributeError("'ConfigurationParams' object has no attribute 'partial_result_token'")

HankBO opened this issue · 2 comments

When debugging json extension example in pygls' package, an error appeared in async def show_configuration_async:
Screen Shot 2022-12-30 at 09 56 51

Tracking back to the root cause:
json-extension - server.py - line 237: config = await ls.get_configuration_async(
pygls - server.py - line 397: return self.lsp.get_configuration_async(params)
pygls - protocol.py: line 457: body = json.dumps(data, default=self._serialize_message)

The exception for calling json.dumps is:
AttributeError("'ConfigurationParams' object has no attribute 'partial_result_token'")
Screen Shot 2022-12-30 at 09 50 19

Looks like it should be WorkspaceConfigurationParams

I'm in the process of putting together a PR with some tests to catch this going forward, but if you change it on your end in the meantime, hopefully that will be enough to fix it for you 🤞