cheran-senthil / TLE

🤖 Discord Bot for Competitive Programming
https://discordapp.com/invite/2CJ6qvY
MIT License
319 stars 203 forks source link

;duel history crash #433

Open krofna opened 3 years ago

krofna commented 3 years ago
  File "/home/ec2-user/TLE/tle/cogs/duel.py", line 418, in _paginate_duels
    return [make_page(chunk) for chunk in paginator.chunkify(data, 7)]
  File "/home/ec2-user/TLE/tle/cogs/duel.py", line 418, in <listcomp>
    return [make_page(chunk) for chunk in paginator.chunkify(data, 7)]
  File "/home/ec2-user/TLE/tle/cogs/duel.py", line 411, in make_page
    log_str = '\n'.join(make_line(entry) for entry in chunk)
  File "/home/ec2-user/TLE/tle/cogs/duel.py", line 411, in <genexpr>
    log_str = '\n'.join(make_line(entry) for entry in chunk)
  File "/home/ec2-user/TLE/tle/cogs/duel.py", line 404, in make_line
    return f'{idstr if show_id else str()}[{name}]({problem.url}) [{problem.rating}] won by [{winner.handle}]({winner.url}) vs [{loser.handle}]({loser.url}) {when} in {duel_time}'
AttributeError: 'NoneType' object has no attribute 'handle'
PotatoHashing commented 3 years ago

I think we have a similar issue, except it just fails silently without throwing an error.

See ;duel history Denjell

image