maubot / gitlab

A GitLab client and webhook receiver for maubot.
GNU Affero General Public License v3.0
95 stars 30 forks source link

failed to handle merge request comment event #34

Closed 4nd3r closed 3 years ago

4nd3r commented 4 years ago

happens only when you comment merge request.

or is it bug in https://github.com/tulir/mautrix-python?

Traceback (most recent call last):
  File "/home/maubot/env/lib/python3.7/site-packages/mautrix/client/api/types/util/serializable_attrs.py", line 109, in _dict_to_attrs
    obj = attrs_type(**new_items)
TypeError: __init__() missing 3 required positional arguments: 'position', 'locked_at', and 'assignee'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/maubot/env/plugins/xyz.maubot.gitlab-v0.1.0.mbp/gitlab_matrix/bot.py", line 121, in process_hook
    evt = EventParse[req.headers["X-Gitlab-Event"]].deserialize(body)
  File "/home/maubot/env/lib/python3.7/site-packages/mautrix/client/api/types/util/serializable_attrs.py", line 264, in deserialize
    return _dict_to_attrs(cls, data)
  File "/home/maubot/env/lib/python3.7/site-packages/mautrix/client/api/types/util/serializable_attrs.py", line 105, in _dict_to_attrs
    field.metadata.get("ignore_errors", False))
  File "/home/maubot/env/lib/python3.7/site-packages/mautrix/client/api/types/util/serializable_attrs.py", line 124, in _try_deserialize
    return _deserialize(cls, value, default)
  File "/home/maubot/env/lib/python3.7/site-packages/mautrix/client/api/types/util/serializable_attrs.py", line 166, in _deserialize
    return _deserialize(cls.__args__[0], value, default)
  File "/home/maubot/env/lib/python3.7/site-packages/mautrix/client/api/types/util/serializable_attrs.py", line 161, in _deserialize
    return _dict_to_attrs(cls, value, default, default_if_empty=True)
  File "/home/maubot/env/lib/python3.7/site-packages/mautrix/client/api/types/util/serializable_attrs.py", line 115, in _dict_to_attrs
    raise SerializerError("Unknown serialization error") from e
mautrix.client.api.types.util.serializable.SerializerError: Unknown serialization error