NeuroAssassin / Toxic-Cogs

A collection of utility, moderation and fun plugins to Red - Discord Bot.
MIT License
47 stars 38 forks source link

[Commandchart] Wedge size error #53

Open Technetium1 opened 3 years ago

Technetium1 commented 3 years ago
Exception in command 'commandchart'
Traceback (most recent call last):
  File "/home/red/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/red/.local/share/Red-DiscordBot/data/TechBot/cogs/CogManager/cogs/commandchart/commandchart.py", line 164, in commandchart
    img = self.create_chart(top_ten, others, channel)
  File "/home/red/.local/share/Red-DiscordBot/data/TechBot/cogs/CogManager/cogs/commandchart/commandchart.py", line 88, in create_chart
    pie = plt.pie(sizes, colors=colors, startangle=0)
  File "/home/red/.local/share/Red-DiscordBot/data/TechBot/cogs/Downloader/lib/matplotlib/pyplot.py", line 2975, in pie
    return gca().pie(
  File "/home/red/.local/share/Red-DiscordBot/data/TechBot/cogs/Downloader/lib/matplotlib/__init__.py", line 1352, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "/home/red/.local/share/Red-DiscordBot/data/TechBot/cogs/Downloader/lib/matplotlib/axes/_axes.py", line 3034, in pie
    raise ValueError("Wedge sizes 'x' must be non negative values")
ValueError: Wedge sizes 'x' must be non negative values

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

Traceback (most recent call last):
  File "/home/red/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/home/red/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/red/.pyenv/versions/red/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ValueError: Wedge sizes 'x' must be non negative values

I'm unsure what other information will be helpful here. It works in most channels.