palmtree5 / aiopixel

GNU General Public License v3.0
0 stars 0 forks source link

Hypixel v3 issues #1

Closed MayhemBill closed 2 years ago

MayhemBill commented 5 years ago

Cog: Hypixel v3

Description of the problem: When I run [p]hypixel player <name> it returns this:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/discord/ext/commands/core.py", line 63, in wrapped
    ret = await coro(*args, **kwargs)
  File "/root/.local/share/Red-DiscordBot/cogs/CogManager/cogs/hpapi/hpapi.py", line 230, in hpplayer
    player = await self.api_client.player_from_name(name)
  File "/root/.local/share/Red-DiscordBot/cogs/Downloader/lib/aiopixel/client.py", line 310, in player_from_name
    return await self.player_from_uuid(uuid)
  File "/root/.local/share/Red-DiscordBot/cogs/Downloader/lib/aiopixel/client.py", line 355, in player_from_uuid
    player_data["lastLogin"], player_data["karma"], player_data["networkExp"],
KeyError: 'karma'

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/discord/ext/commands/bot.py", line 860, in invoke
    await ctx.command.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/redbot/core/commands/commands.py", line 566, in invoke
    await super().invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/discord/ext/commands/core.py", line 1127, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/discord/ext/commands/core.py", line 698, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/usr/local/lib/python3.7/dist-packages/discord/ext/commands/core.py", line 72, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'karma'
palmtree5 commented 5 years ago

Transferred to the library's repo because this is a library issue, not a cog issue