AndyReifman / ArseneWenger

1 stars 12 forks source link

Assists throwing ParserError #74

Open AndyReifman opened 1 year ago

AndyReifman commented 1 year ago

Updating the assists url to use this season causes an error.

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/usr/local/lib/python3.10/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: ParserError: Document is empty

Which causes the following two errors.

OSError: Error reading file '': failed to load external entity ""

Which then causes another exception

lxml.etree.ParserError: Document is empty

Pretty sure this is due to the method not handling competitions that haven't started yet. Should add some flexibility for that.