tisboyo / Twitch_Bot

4 stars 2 forks source link

Error when running !announce status #209

Closed tisboyo closed 3 years ago

tisboyo commented 3 years ago

This happened on the testing AWS. I suspect something is missing from the database

twitchbot_bot | tisboyo(tisboyo): !announce status twitchbot_bot | Task exception was never retrieved twitchbot_bot | future: <Task finished name='Task-167' coro=<BaseBot._run_command() done, defined at /usr/local/lib/python3.9/site-packages/twitchbot/bots/basebot.py:263> exception=TypeError("int() argument must be a string, a bytes-like object or a number, not 'NoneType'")> twitchbot_bot | Traceback (most recent call last): twitchbot_bot | File "/usr/local/lib/python3.9/site-packages/twitchbot/bots/basebot.py", line 294, in _run_command twitchbot_bot | await cmd.execute(msg) twitchbot_bot | File "/usr/local/lib/python3.9/site-packages/twitchbot/command.py", line 242, in execute twitchbot_bot | await func(self.mod, msg, *args) twitchbot_bot | File "/workspace/bot/mods/announcer.py", line 352, in announce_status twitchbot_bot | cat_id = int(session.query(Settings.value).filter(Settings.key == self.current_category_setting).scalar()) twitchbot_bot | TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

tisboyo commented 3 years ago

Expected output

14:18 AddOhms: 🤖 Current status is Enabled 14:18 AddOhms: 🤖 Current delay is 900 seconds. 14:18 AddOhms: 🤖 Next send time will be 13:20:09 which is in 0:02:08. 14:18 AddOhms: 🤖 11/22 of all announcements enabled. 14:18 AddOhms: 🤖 Current category is Default, with 22 announcements