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

Missing structure hook for InlayHint #218

Closed
alcarney opened this issue Jun 17, 2023 · 0 comments · Fixed by #219
Closed

Missing structure hook for InlayHint #218

alcarney opened this issue Jun 17, 2023 · 0 comments · Fixed by #219
Assignees

Comments

@alcarney
Copy link
Contributor

Unable to deserialize message
  + Exception Group Traceback (most recent call last):
  |   File "/var/home/alex/Projects/pygls/pygls/protocol.py", line 405, in _deserialize_message
  |     return self._converter.structure(data, request_type)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/var/home/alex/Projects/pygls/.env/lib64/python3.11/site-packages/cattrs/converters.py", line 309, in structure
  |     return self._structure_func.dispatch(cl)(obj, cl)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "<cattrs generated structure lsprotocol.types.InlayHintResolveRequest>", line 26, in structure_InlayHintResolveRequest
  |     if errors: raise __c_cve('While structuring ' + 'InlayHintResolveRequest', errors, __cl)
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  | cattrs.errors.ClassValidationError: While structuring InlayHintResolveRequest (1 sub-exception)
  +-+---------------- 1 ----------------
    | Exception Group Traceback (most recent call last):
    |   File "<cattrs generated structure lsprotocol.types.InlayHintResolveRequest>", line 10, in structure_InlayHintResolveRequest
    |     res['params'] = __c_structure_params(o['params'], __c_type_params)
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "<cattrs generated structure lsprotocol.types.InlayHint>", line 50, in structure_InlayHint
    |     if errors: raise __c_cve('While structuring ' + 'InlayHint', errors, __cl)
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | cattrs.errors.ClassValidationError: While structuring InlayHint (1 sub-exception)
    | Structuring class InlayHintResolveRequest @ attribute params
    +-+---------------- 1 ----------------
      | Traceback (most recent call last):
      |   File "<cattrs generated structure lsprotocol.types.InlayHint>", line 10, in structure_InlayHint
      |     res['label'] = __c_structure_label(o['label'], __c_type_label)
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/var/home/alex/Projects/pygls/.env/lib64/python3.11/site-packages/cattrs/converters.py", line 377, in _structure_error
      |     raise StructureHandlerNotFoundError(msg, type_=cl)
      | cattrs.errors.StructureHandlerNotFoundError: Unsupported type: typing.Union[str, typing.List[lsprotocol.types.InlayHintLabelPart]]. Register a structure hook for it.
      | Structuring class InlayHint @ attribute label
      +------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants