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

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

Open
geekosaur opened this issue Jun 15, 2024 · 0 comments

Comments

@geekosaur
Copy link

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.

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

No branches or pull requests

1 participant