SauriCogs icon indicating copy to clipboard operation
SauriCogs copied to clipboard

[cookies] list index out of range

Open ltzmax opened this issue 4 years ago • 2 comments

Heya ran command steal, and it errored, cookies is set to global.

Exception in command 'steal'
Traceback (most recent call last):
  File "/redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/root/redbot/cogs/CogManager/cogs/cookies/cookies.py", line 137, in steal
    target_id = random.choice(ids)
  File "/usr/lib/python3.9/random.py", line 347, in choice
    return seq[self._randbelow(len(seq))]
IndexError: list index out of range

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

Traceback (most recent call last):
  File "/redenv/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/redenv/lib/python3.9/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: IndexError: list index out of range

ltzmax avatar Nov 17 '21 15:11 ltzmax

Hey, was it just a one time error, or does it happen over and over again?

elijabesu avatar Nov 18 '21 13:11 elijabesu

It happens everytime someone run steal.

ltzmax avatar Nov 18 '21 13:11 ltzmax