github icon indicating copy to clipboard operation
github copied to clipboard

`GithubError` crashes with "TypeError: github.api.client.GitHubError() got multiple values for keyword argument 'status'"

Open geekosaur opened this issue 1 year ago • 0 comments

16:42:27	ERROR	client/@hs-github:kf8nh.com	Failed to run handler
16:42:27	ERROR	client/@hs-github:kf8nh.com	Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/mautrix/client/syncer.py", line 236, in _catch_errors
    await handler(data)
  File "/opt/maubot/maubot/handlers/command.py", line 142, in __call__
    ok, res = await self.__call_subcommand__(evt, call_args, remaining_val)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/maubot/maubot/handlers/command.py", line 163, in __call_subcommand__
    return True, await subcommand(
                 ^^^^^^^^^^^^^^^^^
  File "/opt/maubot/maubot/handlers/command.py", line 142, in __call__
    ok, res = await self.__call_subcommand__(evt, call_args, remaining_val)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/maubot/maubot/handlers/command.py", line 163, in __call_subcommand__
    return True, await subcommand(
                 ^^^^^^^^^^^^^^^^^
  File "/opt/maubot/maubot/handlers/command.py", line 154, in __call__
    return await self.__mb_func__(self.__bound_instance__, evt, **call_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/plugins/xyz.maubot.github-v0.1.2.mbp/github/commands.py", line 40, in wrapper
    return await fn(self, evt, **kwargs, client=client)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/plugins/xyz.maubot.github-v0.1.2.mbp/github/commands.py", line 262, in webhook_create
    await client.create_webhook(
  File "/data/plugins/xyz.maubot.github-v0.1.2.mbp/github/api/client.py", line 188, in create_webhook
    raise GitHubError(status=resp.status, **data)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: github.api.client.GitHubError() got multiple values for keyword argument 'status'

So I know adding webhooks failed, but I don't get told why.

An SO search tells me that this means there's a collision between positional and keyword parameters. I don't think I know enough Python to fix this.

maubot is running in a Docker container which has Python 3.11.8 installed in it. The host is Ubuntu 22.04.3.

geekosaur avatar Jun 15 '24 21:06 geekosaur