Skip to content

[GoogleTrends] Cog not working #119

Open
@mrPauwHaan

Description

@mrPauwHaan

What cog is this bug report for?

GoogleTrends

What versions are you running?

No response

Describe the bug

When I use a command I am getting the error as shown below

If there's an error, paste it here

Traceback (most recent call last):
  File "/data/venv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 229, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/cogs/CogManager/cogs/googletrends/googletrends.py", line 113, in trends
    request = await self.get_trends_request(list(query), timeframe, geo)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/cogs/CogManager/cogs/googletrends/plot.py", line 42, in get_trends_request
    return await self.bot.loop.run_in_executor(self.executor, func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/cogs/CogManager/cogs/googletrends/plot.py", line 47, in _get_trends_request
    trend.build_payload(
  File "/data/cogs/Downloader/lib/pytrends/request.py", line 189, in build_payload
    self._tokens()
  File "/data/cogs/Downloader/lib/pytrends/request.py", line 195, in _tokens
    widget_dicts = self._get_data(
                   ^^^^^^^^^^^^^^^
  File "/data/cogs/Downloader/lib/pytrends/request.py", line 124, in _get_data
    retry = Retry(total=self.retries, read=self.retries,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Retry.__init__() got an unexpected keyword argument 'method_whitelist'

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

Traceback (most recent call last):
  File "/data/venv/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
    await ctx.command.invoke(ctx)
  File "/data/venv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1023, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 File "/data/venv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 238, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: Retry.__init__() got an unexpected keyword argument 'method_whitelist'

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions