upmyfee icon indicating copy to clipboard operation
upmyfee copied to clipboard

How can I correct this trace back call

Open SonOfHerluko opened this issue 6 years ago • 7 comments

Traceback (most recent call last): File "./upmyfee.py", line 147, in upmyfee = UpMyFee(service_url, UNLOCK_TIMEOUT) File "./upmyfee.py", line 14, in init self.api = AuthServiceProxy(service_url=service_url, verify=False) File "/data/data/com.termux/files/home/upmyfee/authproxy.py", line 53, in init schema, username, password, hostport = re.search(r'^(.)://(.):(.)@(.)$', service_url).groups() AttributeError: 'NoneType' object has no attribute 'groups' $

SonOfHerluko avatar Jan 07 '20 10:01 SonOfHerluko

I have the same error. How to solve?

And82 avatar May 21 '20 00:05 And82

It isn't working at all... Can anyone help.

Ben-maxwel avatar Aug 20 '20 16:08 Ben-maxwel

@Ben-maxwel could you please provide your service_url value?

daniel-yavorovich avatar Aug 20 '20 16:08 daniel-yavorovich

help with trace back

Traceback (most recent call last): File "upmyfee.py", line 2, in import argparse ImportError: No module named argparse

btcworld2 avatar Jan 09 '21 06:01 btcworld2

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Python39\lib\site-packages\requests\adapters.py", line 430, in send resp = conn.urlopen( File "C:\Python39\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen retries = retries.increment(method, url, error=e, _pool=self, File "C:\Python39\lib\site-packages\urllib3\util\retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='127.0.0.1', port=8332): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000208C86E7C70>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\local\upmyfee\upmyfee.py", line 148, in upmyfee.change_fee(payer, to, txid, fee, debug) File "E:\local\upmyfee\upmyfee.py", line 84, in change_fee orig_rawtx = self.api.getrawtransaction(txid) File "E:\local\upmyfee\authproxy.py", line 86, in call resp = self.__session.send(prepped, verify=self.__verify, timeout=self.__timeout) File "C:\Python39\lib\site-packages\requests\sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "C:\Python39\lib\site-packages\requests\adapters.py", line 508, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='127.0.0.1', port=8332): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000208C86E7C70>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

trextrader avatar Jan 21 '21 01:01 trextrader

I thought I had it running there for a second, it paused as if it were doing something, then it threw the below error....

NOTE: take out the 'https...' ('') so its just https... The rest should theoretically work, as I am running Bitcoind locally, however, @localhost: was a different and larger set of errors, hence the removal of the single quotation marks.

How should I attempt to resolve the below?

The .py I run with args from cmd line is as follows: python upmyfee.py --rpc-url=https://xxx:[email protected]:8332 --txid=9c90b460992a8c69adc7605acbf02f2ac5120ecc081540a6a8df208407506042 --payer=bc1q5rhd2x8kr3xd7w6t3x0j8zurc*-- --to=--fee=0.003


During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\local\upmyfee\upmyfee.py", line 148, in upmyfee.change_fee(payer, to, txid, fee, debug) File "E:\local\upmyfee\upmyfee.py", line 84, in change_fee orig_rawtx = self.api.getrawtransaction(txid) File "E:\local\upmyfee\authproxy.py", line 86, in call resp = self.__session.send(prepped, verify=self.__verify, timeout=self.__timeout) File "C:\Python39\lib\site-packages\requests\sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "C:\Python39\lib\site-packages\requests\adapters.py", line 508, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='127.0.0.1', port=8332): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000208C86E7C70>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))


Thanks so much and appreciate you posting this! If it works I will send you a dev fee via btc if yiu send me your btc address to [email protected]


Suggested much needed improvements for next revision.

Perhaps if we split off from rpc-url the username and pw such that you add two additional args:

--rpc-url=https://xxx:[email protected]:8332 --rpcuser=xxx --rpcpassword=xxx

and possibly a change from --fee=0.03 to --paytxfee=0.03 (I believe paytaxfee is correct cmd(?)...

Last, if you can setup a simple flag like we do in C++ as a #Define where its 0 or 1, such that 0 meaning use args via argsparse module, otherwise default to using Bitcoin.conf which would look something along these lines:

    rpcuser=xxx
    rpcpassword=xxx
    gen=1
    txindex=1
    paytxfee=0.03 
    rpcallowip=127.0.0.1
    rpcallowip=<ip address of pc running the bitcoin daemon, e.g. 192.168.2.??>
    ...

and as a suggestion, since we have the daemon, why not automate the Python script and setup the TXID and corresponding wallet address of the transaction being modified to send to new address...I am a C++ dev and not much of a Python dev but it should be fairly simple for any Python dev I would imagine to execute the following in real-time in code/script:

a) Query blockchain for all unconfirmed transactions and if needed store to an xml or csv file and/or write into memory. b) Setup a series of user defined conditions (e.g. Disregard transactions < <BTC amount> AND > <BTC Amount> c) Other omissions/conditions that can be hard coded into the algo. For example, # of transactions for that wallet must be > N. d) With the above filters, let it roll with a maximum BTC limit per day of BTC, plus have different receive wallets that randomly pick from a csv list of wallets stored (min = 5 max=100), Once max is received, shut down program automatically, verify the transactions were completed and the BTC is spendable in <one or more of your end-users wallets).

Voile! - That is the kind of software that we need brother turn it on and let it go on auto...

/Zap

trextrader avatar Jan 21 '21 01:01 trextrader

File "C:\Users\user\upmyfee\upmyfee.py", line 148, in upmyfee.change_fee(payer, to, txid, fee, debug) File "C:\Users\user\upmyfee\upmyfee.py", line 87, in change_fee vin, vout, orig_fee, fee_diff, orig_amount, new_amount = self.get_new_tx(orig_tx, payer, to, fee) File "C:\Users\user\upmyfee\upmyfee.py", line 27, in get_new_tx vins_sum_amounts = sum([self.get_tx_amount(t['txid']) for t in orig_vins]) File "C:\Users\user\upmyfee\upmyfee.py", line 27, in vins_sum_amounts = sum([self.get_tx_amount(t['txid']) for t in orig_vins]) File "C:\Users\user\upmyfee\upmyfee.py", line 17, in get_tx_amount return self.api.gettransaction(txid)['amount'] File "C:\Users\user\upmyfee\authproxy.py", line 90, in call raise JSONRPCException(response['error']) authproxy.JSONRPCException: -5: Invalid or non-wallet transaction id

How to solved?

simentree avatar Jul 18 '21 07:07 simentree