mau_mau_bot
mau_mau_bot copied to clipboard
Crash when sending a card
There is an ongoing bug which fails to check if a card can be sent and as a consequence doesn't record the play, doesn't update the hand, etc. and leads to timeout skipping to the next player, allowing the sticker to be sent to the group but not removing the card from the hand and not finishing the current play.
Trace:
2021-11-09 11:42:02,292 - utils - ERROR - Message text is empty
Traceback (most recent call last):
File "/home/iuri/git/iuriguilherme/mau_mau_bot/utils.py", line 92, in send_async
bot.sendMessage(*args, **kwargs)
File "/home/iuri/.local/share/virtualenvs/mau_mau_bot-hie6xpcQ/lib/python3.7/site-packages/telegram/bot.py", line 57, in decorator
result = func(self, *args, **kwargs)
File "/home/iuri/.local/share/virtualenvs/mau_mau_bot-hie6xpcQ/lib/python3.7/site-packages/telegram/bot.py", line 82, in decorator
result = self._request.post(url, data, timeout=kwargs.get('timeout'))
File "/home/iuri/.local/share/virtualenvs/mau_mau_bot-hie6xpcQ/lib/python3.7/site-packages/telegram/utils/request.py", line 272, in post
**urlopen_kwargs)
File "/home/iuri/.local/share/virtualenvs/mau_mau_bot-hie6xpcQ/lib/python3.7/site-packages/telegram/utils/request.py", line 210, in _request_wrapper
raise BadRequest(message)
telegram.error.BadRequest: Message text is empty
Could you please provide more informations about the status of the game?
My two cents: is it Sanic mode? One player has left the chat or has been removed from the group, right?
I'm confident no player left the chat during the game, but I remember the game mode has never been set.
That stack trace comes from a bot which was in the same group as @unobot using the HEAD of the repository with unchanged settings. In the same group there was the @gameebot, one bot that keeps a persistent keyboard in the group for everyone.
The issue was happening with @unobot at first so I came up with a second bot to see if it was a network problem, telegram bot api problem, etc. - also because I could then change logging level to DEBUG and see what was happening.
I haven't dumped the logging.DEBUG but I couldn't see anything obvious there, I would need to troubleshoot the code step by step to find the exact place where there's a problem.
Since you're using a copy of @unobot, Sanic mode is settled by default (if you didn't change the code).
Could you please provide the link to your group?
It would be https://t.me/joinchat/bD3i0o7K2CtjMDIx
Hi @iuriguilherme , did you resolve the issue? I have the same exact one. Please let me know
Hi @iuriguilherme , did you resolve the issue? I have the same exact one. Please let me know
Long ago I got the same error and I'm pretty sure it depends on the "status_update" function in your cases too. One of your group admins has probably removed one of the players from the group. Alternatively, one of the players may have probably left the group in the middle of a game.
Try to remove the "status_update" function from bot.py
and see what happens. It's bugged and can't be precise. Skip and kick commands are a nice solution to this problem and are always available to the players.
idk if it's that, but after i changed inline feedback to 100% in Bot Father, bot stopped crashing
idk if it's that, but after i changed inline feedback to 100% in Bot Father, bot stopped crashing
![]()
I'm not sure if you got the same error, but yes, 100% is required.
idk if it's that, but after i changed inline feedback to 100% in Bot Father, bot stopped crashing
![]()
I'm not sure if you got the same error, but yes, 100% is required.
Yes, error is same.