Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I correct this trace back call #1

Open
SonOfHerluko opened this issue Jan 7, 2020 · 7 comments
Open

How can I correct this trace back call #1

SonOfHerluko opened this issue Jan 7, 2020 · 7 comments
Assignees

Comments

@SonOfHerluko
Copy link

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'
$

@And82
Copy link

And82 commented May 21, 2020

I have the same error. How to solve?

@Ben-maxwel
Copy link

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

@daniel-yavorovich
Copy link
Contributor

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

@daniel-yavorovich daniel-yavorovich self-assigned this Aug 20, 2020
@btcworld2
Copy link

help with trace back

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

@trextrader
Copy link

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
Copy link

trextrader commented Jan 21, 2021

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:xxx@127.0.0.1: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 zapolator@gmail.com


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:xxx@127.0.0.1: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 < AND >
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

@simentree
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants