Closed josephdyland closed 7 years ago
One of the issues I see is that the 'unit' field was designed to be 3-letter-long and in your case it's 5 letters (unit: ldoge). The SQL table definition is such that anything longer than 3 letters will be cut short (so you see Warning: Data truncated for column 'coin' at row 1 cursor.execute(statement, parameters)
). As a result, maybe the code ends up sending an invalid request to coin daemon and receives a bad response.
Thank you for the quick response! I created a new table and imported the altcointip.sql source. changed the symbol and unit to LDG and Modified /src/conf/db.yml
to point to the new table. Then ran python _addcoin LDG
. I think I just get the same error with out the data truncated warning.
DEBUG:cointipbot:> CtbUser::__init__(thedoctor___)
DEBUG:cointipbot:< CtbUser::__init__(thedoctor___) DONE
DEBUG:cointipbot:> CtbUser::is_registered(thedoctor___)
DEBUG:cointipbot:< CtbUser::is_registered(thedoctor___) DONE (no)
DEBUG:cointipbot:> CtbUser::register(thedoctor___)
DEBUG:bitcoin:Starting "walletpassphrase" JSON-RPC request
DEBUG:bitcoin:Got 36 byte response from server in 131 ms
DEBUG:bitcoin:Starting "getnewaddress" JSON-RPC request
DEBUG:bitcoin:Got 68 byte response from server in 2 ms
DEBUG:bitcoin:Starting "walletlock" JSON-RPC request
DEBUG:bitcoin:Got 36 byte response from server in 1 ms
INFO:cointipbot:CtbUser::register(thedoctor___): got LDG address dGnSwTCyBa4YKvWuvzmEKg5TWb1m24PfGG
DEBUG:cointipbot:< CtbUser::register(thedoctor___) DONE
DEBUG:cointipbot:> CtbUser::balance(thedoctor___)
INFO:cointipbot:CtbUser::balance(thedoctor___): getting LDG givetip balance
DEBUG:cointipbot:CtbCoin::getbalance(thedoctor___, 10)
DEBUG:bitcoin:Starting "getbalance" JSON-RPC request
ERROR:bitcoin:500 (Internal Server Error) response from bitcoind
ERROR:cointipbot:CtbCoin.getbalance(): error getting Litedoge (minconf=10) balance for thedoctor___: 500 (Internal Server Error) response from bitcoind
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "cointipbot.py", line 533, in __init__
self.self_checks()
File "cointipbot.py", line 142, in self_checks
ctb_balance = b.get_balance(coin=c, kind='givetip')
File "ctb/ctb_user.py", line 91, in get_balance
balance = self.ctb.coins[coin].getbalance(_user=self.name, _minconf=self.ctb.conf.coins[coin].minconf[kind])
File "ctb/ctb_coin.py", line 70, in getbalance
balance = self.conn.getbalance(user, minconf)
File "ctb/pifkoin/bitcoind.py", line 69, in __call__
return server._rpc_call(self.method, *args)
File "ctb/pifkoin/bitcoind.py", line 216, in _rpc_call
raise BitcoindException('%d (%s) response from bitcoind' % (response.status, response.reason))
ctb.pifkoin.bitcoind.BitcoindException: 500 (Internal Server Error) response from bitcoind
I resolved this issue, by turning enableaccounts=1 in the wallets .conf.
I now have the bot connected to reddit and monitoring the subreddit. Users can register and get a address, They can also send coins to address and +info returns the proper amount.
My issue now is Tipping, I have tried dozens of differnt combinations and I keep getting a reddit message back asking to verify Syntax.
This is from the logs when it processes the tip.
INFO:cointipbot:CointipBot::check_inbox(): no match
DEBUG:cointipbot:> CtbUser::__init__(thedoctor___)
DEBUG:cointipbot:< CtbUser::__init__(thedoctor___) DONE
DEBUG:cointipbot:CointipBot::check_inbox(): Sorry thedoctor\_\_\_, I didn't understand your comment. Please verify syntax and try again.
*****
DEBUG:cointipbot:> eval_comment()
DEBUG:cointipbot:eval_comment(): match found
DEBUG:cointipbot:> reddit_get_parent_author()
DEBUG:cointipbot:< reddit_get_parent_author(ct0ai57) -> josephdyland
DEBUG:cointipbot:eval_comment(): creating action givetip: to_user=josephdyland, to_addr=None, amount=None, coin=None, fiat=None
DEBUG:cointipbot:> CtbAction::__init__({'fiat_val': None, 'fiat': None, 'msg_id': None, 'subr': Subreddit(subreddit_name='litedoge'), 'keyword': u'all', 'atype': 'givetip', 'self': <ctb.ctb_action.CtbAction object at 0x7fd6ff229610>, 'from_user': None, 'to_addr': None, 'to_user': u'josephdyland', 'ctb': <cointipbot.CointipBot object at 0x7fd700fc9ad0>, 'coin_val': None, 'msg': <praw.objects.Comment object at 0x7fd6ff695790>, 'coin': None})
DEBUG:cointipbot:> CtbUser::__init__(josephdyland)
DEBUG:cointipbot:< CtbUser::__init__(josephdyland) DONE
DEBUG:cointipbot:> CtbUser::__init__(thedoctor___)
DEBUG:cointipbot:< CtbUser::__init__(thedoctor___) DONE
DEBUG:cointipbot:CtbAction::__init__(): <CtbAction: type=givetip, msg.body=+/u/ldogetipbot all, from_user=<CtbUser: name=thedoctor___, giftamnt=None, joindate=None, addr={}, redditobj=thedoctor___, banned=False>, to_user=<CtbUser: name=josephdyland, giftamnt=None, joindate=None, addr={}, redditobj=None, banned=False>, to_addr=None, coin=None, fiat=None, coin_val=None, fiat_val=None, subreddit=litedoge>
WARNING:cointipbot:eval_comment(): CtbAction::__init__(type=%s): keyword is coin-only, but only fiat is set
this is interesting. when i played with it a bit, i was able to get tipping to work, and lost withdraw function.
I am working on adding LiteDoge coin altcointip bot to Reddit.
My coins.yml looks like;
I ran python _add_coin.py ldoge
when I run sh _start.sh it fails to start with Error 500
I think I am close to getting this up and running but cannot seem to track down the problem.