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

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

Closed
HankBO opened this issue Dec 30, 2022 · 2 comments · Fixed by #310
Closed

Comments

@HankBO
Copy link
Contributor

HankBO commented Dec 30, 2022

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

@alcarney
Copy link
Collaborator

alcarney commented Jan 3, 2023

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 🤞

@tombh
Copy link
Collaborator

tombh commented Feb 16, 2023

Released in https://pypi.org/project/pygls/1.0.1

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

Successfully merging a pull request may close this issue.

3 participants