Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Judgementシステムのおガバを修正する #135

Open
loxygenK opened this issue May 25, 2020 · 1 comment
Open

Judgementシステムのおガバを修正する #135

loxygenK opened this issue May 25, 2020 · 1 comment
Assignees
Labels
ahoxa I am so sorry that I am alive making such a stupid bug... bug Something isn't working i'll do later sry 響ってかわいいよね

Comments

@loxygenK
Copy link
Contributor

loxygenK commented May 25, 2020

max = int(commands[1])+1
random.sample(range(1, max),random.randint(1, max))

random.randint(1, max)maxを引いたときにガバるみたいなのだ
image
ちなみにこのバグのINVESTIGATEにあたって、見るログを間違えて10分ぐらいみんなの時間を溶かしてしまったのだ

@loxygenK loxygenK added bug Something isn't working 響ってかわいいよね labels May 25, 2020
@loxygenK
Copy link
Contributor Author

こ↑こ↓

error_occurs_at = random.sample(range(1,int(commands[1])+1),random.randint(1,int(commands[1])+1))

ログをどうぞ:
# ↑見切れちゃったのだ
2020-05-25T07:45:39.060388+00:00 app[bot.1]:     await command.execute()
2020-05-25T07:45:39.060393+00:00 app[bot.1]:   File "/app/message_command.py", line 101, in execute
2020-05-25T07:45:39.060394+00:00 app[bot.1]:     await commands_list[command_type](command)
2020-05-25T07:45:39.060394+00:00 app[bot.1]:   File "/app/message_command.py", line 208, in util_command
2020-05-25T07:45:39.060395+00:00 app[bot.1]:     await MessageCommands.MANUAL_JUDGE.call(commands, self.channel)
2020-05-25T07:45:39.060418+00:00 app[bot.1]:   File "/app/lib/manual_judge.py", line 106, in call
2020-05-25T07:45:39.060419+00:00 app[bot.1]:     error_occurs_at = random.sample(range(1,int(commands[1])+1),random.randint(1,int(commands[1])+1))
2020-05-25T07:45:39.060421+00:00 app[bot.1]:   File "/app/.heroku/python/lib/python3.6/random.py", line 320, in sample
2020-05-25T07:45:39.060421+00:00 app[bot.1]:     raise ValueError("Sample larger than population or is negative")
2020-05-25T07:45:39.060452+00:00 app[bot.1]: ValueError: Sample larger than population or is negative

@Colk-tech Colk-tech self-assigned this May 27, 2020
@Colk-tech Colk-tech added ahoxa I am so sorry that I am alive making such a stupid bug... i'll do later sry and removed ahoxa I am so sorry that I am alive making such a stupid bug... labels May 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ahoxa I am so sorry that I am alive making such a stupid bug... bug Something isn't working i'll do later sry 響ってかわいいよね
Projects
None yet
Development

No branches or pull requests

2 participants