vindimy / altcointip

Reddit ALTcointip bot gives users ability to tip each other using various cryptocurrency coins, such as Bitcoins, Litecoins, Peercoins, Namecoins, and others.
http://www.reddit.com/r/ALTcointip/wiki/index
GNU General Public License v2.0
106 stars 143 forks source link

Latest update seemed to have caused this error + crash: #24

Closed ghost closed 10 years ago

ghost commented 10 years ago

The bot just crashed after this message:

ERROR 2014-01-29 19:29:01,992 CointipBot::check_inbox(): CtbAction::__init__(atype=givetip, from_user=ViewSauce): u_to xor addr_to must be set
ERROR 2014-01-29 19:29:01,992 CointipBot::main(): exception: CtbAction::__init__(atype=givetip, from_user=ViewSauce): u_to xor addr_to must be set
ERROR 2014-01-29 19:29:01,993 CointipBot::main(): traceback: Traceback (most recent call last):
  File "cointipbot.py", line 558, in main
    self.check_inbox()
  File "cointipbot.py", line 235, in check_inbox
    action = ctb_action.eval_message(m, self)
  File "ctb/ctb_action.py", line 1074, in eval_message
    ctb=ctb)
  File "ctb/ctb_action.py", line 87, in __init__
    raise Exception("CtbAction::__init__(atype=%s, from_user=%s): u_to xor addr_to must be set" % (self.type, self.u_from.name))
Exception: CtbAction::__init__(atype=givetip, from_user=ViewSauce): u_to xor addr_to must be set
vindimy commented 10 years ago

Hey there, I don't see that error coming up on my end. Could you post the debug output as well as the tip comment that caused it? Thanks.

ghost commented 10 years ago

DEBUG:cointipbot:> CointipBot::check_inbox() INFO:cointipbot:CointipBot::check_inbox(): message from ViewSauce DEBUG:cointipbot:> check_action(None) DEBUG:cointipbot:check_action(): <SELECT * FROM t_action WHERE msg_id = '1i3oyu'> DEBUG:cointipbot:< check_action() DONE (no) DEBUG:cointipbot:CointipBot::check_inbox(): checking whether user 'ViewSauce' is banned... DEBUG:cointipbot:> CtbUser::init(ViewSauce) DEBUG:cointipbot:< CtbUser::init(ViewSauce) DONE DEBUG:cointipbot:> eval_message() DEBUG:cointipbot:eval_message(): match found DEBUG:cointipbot:eval_message(): creating action givetip: from_user=ViewSauce, to_addr=None, amount=1, coin=ltc, fiat=None DEBUG:cointipbot:> CtbAction::init({'fiat_val': None, 'fiat': None, 'msg_id': None, 'subr': None, 'keyword': None, 'atype': 'givetip', 'self': <ctb.ctb_action.CtbAction object at 0x36a0d90>, 'from_user': Redditor(user_name='ViewSauce'), 'to_addr': None, 'to_user': None, 'ctb': <cointipbot.CointipBot object at 0x337e7d0>, 'coin_val': u'1', 'msg': <praw.objects.Message object at 0x36a0690>, 'coin': 'ltc'}) DEBUG:cointipbot:> CtbUser::init(ViewSauce) DEBUG:cointipbot:< CtbUser::init(ViewSauce) DONE ERROR:cointipbot:CointipBot::check_inbox(): CtbAction::init(atype=givetip, from_user=ViewSauce): u_to xor addr_to must be set ERROR:cointipbot:CointipBot::main(): exception: CtbAction::init(atype=givetip, from_user=ViewSauce): u_to xor addr_to must be set ERROR:cointipbot:CointipBot::main(): traceback: Traceback (most recent call last): File "cointipbot.py", line 558, in main self.check_inbox() File "cointipbot.py", line 235, in check_inbox action = ctb_action.eval_message(m, self) File "ctb/ctb_action.py", line 1074, in eval_message ctb=ctb) File "ctb/ctb_action.py", line 87, in init raise Exception("CtbAction::init(atype=%s, from_user=%s): u_to xor addr_to must be set" % (self.type, self.u_from.name)) Exception: CtbAction::init(atype=givetip, from_user=ViewSauce): u_to xor addr_to must be set

ghost commented 10 years ago

Oh, I guess it could be an issue with the message, but how can I get more info than the above?

vindimy commented 10 years ago

I can try to locate an issue if you paste the tip message here. Also, there was an issue with sending tips thru PM (same error as yours) but it was fixed a few weeks back. Do you have the latest version of the code?

ghost commented 10 years ago

Oh, the reddit bot messaged my bot and threw it into a loop were my bot was replying to it with the same error message. That happened for an hour until i logged in through the site and also restarted the bot.

Damn, I logged in and checked the messages and the message ID in the error above is this:

ViewSauceinfo
[–] from ViewSauce sent 4 hours ago
+/u/litetip 1 LTC LKG9YhbXrSCKwZdoq36RnBwC5phPUf6pct
permalink

A private message tip.

Also, yes, current version.

vindimy commented 10 years ago

Thanks, error found and fixed in 730629957fb883220766ec9f27cd1e48491cb540

ghost commented 10 years ago

Thanks very much!