stenyak / breakbot

WhatsApp<->IRC gateway bot
90 stars 38 forks source link

Server Messages/Actions cause Exceptions #7

Closed thinko closed 10 years ago

thinko commented 10 years ago

2013-09-06 11:53:51.336778 II bot.py:76: <<< IRC 1378490031330690: dronechop in wabbot said to None: VERSION 2013-09-06 11:53:51.337105 EE catch_them_all.py:12: Traceback (most recent call last): File "/home/whatsapp/breakbot-master/catch_them_all.py", line 10, in wrapper return function(_args, *_kwargs) File "bot.py", line 80, in irc_msg_received raise Exception("Private message sent to no one?") Exception: Private message sent to no one?

2013-09-06 11:53:51.337105 EE catch_them_all.py:12: Exception in function irc_msg_received

stenyak commented 10 years ago

I have not encountered this bug so far. Could you please provide step-by-step instructions on how to reproduce this problem, so that I can debug it? Thanks!

cybersyx commented 10 years ago

This error appear when one user try to query the bot on IRC

cybersyx commented 10 years ago

And when i try to message the bot number directly form whatsapp i get this error: 2013-11-15 17:59:21.348983 EE catch_them_all.py:12: Exception in function onMessageReceived 2013-11-15 17:59:32.458083 EE catch_them_all.py:12: Traceback (most recent call last): File "/root/breakbot/catch_them_all.py", line 10, in wrapper return function(_args, *_kwargs) File "/root/breakbot/wa_bot.py", line 43, in onMessageReceived messageContent = unicode(messageContent, "utf-8") TypeError: decoding Unicode is not supported

2013-11-15 17:59:32.458083 EE catch_them_all.py:12: Exception in function onMessageReceived

h1rule commented 10 years ago

Still happens here too!

2014-01-28 13:35:37.129985 II bot.py:76: <<< IRC 1390912536929572: ven000m in #whatsapp_cantina_group said to None: A 2014-01-28 13:35:37.130125 EE catch_them_all.py:12: Traceback (most recent call last): File "/home/niko/spambots/0176/catch_them_all.py", line 10, in wrapper return function(_args, *_kwargs) File "./bot.py", line 89, in irc_msg_received msg = "%s" %(message.get_nick(), message.msg) TypeError: not all arguments converted during string formatting

2014-01-28 13:35:37.130125 EE catch_them_all.py:12: Exception in function irc_msg_received

stenyak commented 10 years ago

@capsload the error you are experiencing is not the one @cybersyx describes. Your problem is that you have modified the code and your modification is not working. You have removed the <%s> without also removing the corresponding parameter (in this specific case, you should remove message.get_nick()).

stenyak commented 10 years ago

@cybersyx I've fixed a problem with private IRC messages in 8fcb8c5778e63c7badec3a5b49b89b225ed6d873, can you please pull the latest breakbot version and try again, and check if your problem persists? Thanks!

cybersyx commented 10 years ago

@stenyak now work perfectly :) one last problem: when i try to send message from whatsapp directly to whatsapp number bot i get this:

2014-01-31 22:41:41.786789 EE catch_them_all.py:12: Traceback (most recent call last): File "/root/breakbot/catch_them_all.py", line 10, in wrapper return function(_args, *_kwargs) TypeError: onMessageReceived() takes exactly 7 arguments (8 given)

2014-01-31 22:41:41.786789 EE catch_them_all.py:12: Exception in function onMessageReceived

stenyak commented 10 years ago

@cybersyx this issue should have been fixed by 04f78103500d34e5d, so you shouldn't get that error anymore. Please check that, and if you encounter any further problems, pleas let me know!