stenyak / breakbot

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

Problem to run bot.py #10

Open andremacola opened 10 years ago

andremacola commented 10 years ago

013-11-23 02:02:31.340749 II bot.py:145: Program started Traceback (most recent call last): File "bot.py", line 146, in b = Bot(cfg["wa_phone"], cfg["wa_password"], contacts, cfg["irc_server_name"], int(cfg["irc_server_port"]), cfg["bot_owner_nick"], cfg["log_file"]) File "bot.py", line 39, in init irc_nick = contacts[wa_phone] KeyError: u'5598XXXXXXXX'

How to solve this problem? I tried everything on config file.

NotAFile commented 10 years ago

You added the Xs to the number, right? I had this too, and I added the bot's number to the contacts and it worked!

stenyak commented 10 years ago

Yes, please make sure you add it to the contact list,as explained in the readme: 6. Make sure your bot nick and phone are also in the contact list. If that doesn't fix it, let us know.

andremacola commented 10 years ago

Already do that, but no success. Wich version of Python do you use?

Traceback (most recent call last): File "/Volumes/Data/arquivos/github/breakbot/irc_bot.py", line 86, in connect self.conn.next() File "/Volumes/Data/arquivos/github/breakbot/oyoyo/client.py", line 162, in connect raise e error: [Errno 35] Resource temporarily unavailable

2013-11-23 21:38:28.749074 EE irc_bot.py:88: Problems while connecting to IRC server: [Errno 35] Resource temporarily unavailable 2013-11-23 21:38:28.752831 II bot.py:62: Stop instructed, about to stop main loop

Traceback (most recent call last): File "/Volumes/Data/arquivos/github/breakbot/catch_them_all.py", line 10, in wrapper return function(args, *kwargs) File "/Volumes/Data/arquivos/github/breakbot/irc_bot.py", line 115, in run self.join_channels() File "/Volumes/Data/arquivos/github/breakbot/irc_bot.py", line 105, in join_channels self.cli.send("JOIN", c) File "/Volumes/Data/arquivos/github/breakbot/oyoyo/client.py", line 126, in send self.socket.send(msg + bytes("\r\n", "ascii")) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 170, in _dummy raise error(EBADF, 'Bad file descriptor')

NotAFile commented 10 years ago

did you read the error messages? It seems that the irc server does not exist/ you typed it wrong! I'm not sure what the second error is about, stenyak will have to help you on that one. It might be a error caused by the fist error though

andremacola commented 10 years ago

The irc server is fine. I'm using another Whatsapp Bot and improved by me and a friend with notification when a nick is called, personal colors and irc comands, we'll share when done. Unfortunately breakbot not run here =\

stenyak commented 10 years ago

@andremacola the bot is tested to work using python 2.7.5 under debian unstable. The first exception you get is thrown by the underlying IRC library ("oyoyo"), which seems to be unable to connect to the IRC server. The second error is thrown by breakbot itself, as a consequence of the IRC problems experienced right before.

Let's focus on the oyoyo problems. Can you please attach your breakbot settings, especifically everything related to the IRC connection? That is, all the "irc_....." lines in your config.json file (please omit any personal data such as phone number or passwords).

Thanks.