maubot / gitlab

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

GitLab plugin fails to start: TypeError: 'ABCMeta' object is not subscriptable #56

Closed ginkel closed 3 years ago

ginkel commented 3 years ago

Hi there,

probably since upgrading to maubot 0.2.0 the GitLab plugin (v0.1.1) fails to start with the following error:

[2021-11-22 09:10:27,392] [INFO@mau.init] Initializing maubot 0.2.0
[...]
[2021-11-22 09:10:27,995] [ERROR@maubot.loader.zip] Failed to load xyz.maubot.gitlab v0.1.1
Traceback (most recent call last):
  File "/opt/maubot/maubot/loader/zip.py", line 203, in _load
    importer.load_module(module)
  File "/opt/maubot/maubot/lib/zipimport.py", line 282, in load_module
    exec(code, mod.__dict__)
  File "/data/plugins/xyz.maubot.gitlab-v0.1.1.mbp/gitlab_matrix/__init__.py", line 1, in <module>
    from .bot import GitlabBot
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/data/plugins/xyz.maubot.gitlab-v0.1.1.mbp/gitlab_matrix/bot.py", line 24, in <module>
    from .webhook import GitlabWebhook
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/data/plugins/xyz.maubot.gitlab-v0.1.1.mbp/gitlab_matrix/webhook.py", line 32, in <module>
    from .types import GitlabJobEvent, EventParse, Action, OTHER_ENUMS
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/data/plugins/xyz.maubot.gitlab-v0.1.1.mbp/gitlab_matrix/types.py", line 76, in <module>
    class GitlabLabel(SerializableAttrs['GitlabLabel']):
TypeError: 'ABCMeta' object is not subscriptable

Any ideas?

Environment:

Thanks, Thilo

tulir commented 3 years ago

This was fixed in https://github.com/maubot/gitlab/commit/7e853e573e139adbff7df50c64c2d8eef093363e

ginkel commented 3 years ago

Excellent, thanks a lot! I can confirm that the v0.2.0 plugin works like a charm!