Cert issuer: WARNING - HTTP Error 503: Service Temporarily Unavailable

I’m getting testnet insufficient funds even though I have funds in the address

INFO - This run will try to issue on the bitcoin_testnet chain
INFO - Set cost constants to recommended_tx_fee=0.000600,min_per_output=0.000028,satoshi_per_byte=250
INFO - Processing 2 certificates
INFO - Processing 2 certificates under work path=C:/Users/Vinay/vinay_env/cert-issuer/data/work
WARNING - HTTP Error 503: Service Temporarily Unavailable
WARNING - address myt59jbZC6PiXyef38q2sbdPM57eKd1r2M has a balance of 0
INFO - Total cost will be 133500 satoshis
ERROR - Please add 133500 satoshis to the address myt59jbZC6PiXyef38q2sbdPM57eKd1r2M
ERROR - Please add 133500 satoshis to the address myt59jbZC6PiXyef38q2sbdPM57eKd1r2M
Traceback (most recent call last):
File “C:/Users/Vinay/vinay_env/venv/Lib/site-packages/cert_issuer-2.0.17-py3.7.egg/cert_issuer/issue_certificates.py”, line 44, in
tx_id = main(parsed_config)
File “C:/Users/Vinay/vinay_env/venv/Lib/site-packages/cert_issuer-2.0.17-py3.7.egg/cert_issuer/issue_certificates.py”, line 36, in main
return issue(app_config, certificate_batch_handler, transaction_handler)
File “C:/Users/Vinay/vinay_env/venv/Lib/site-packages/cert_issuer-2.0.17-py3.7.egg/cert_issuer/issue_certificates.py”, line 16, in issue
File “C:\Users\Vinay\vinay_env\venv\lib\site-packages\cert_issuer-2.0.17-py3.7.egg\cert_issuer\blockchain_handlers\bitcoin\transaction_handlers.py”, line 51, in ensure_balance
raise InsufficientFundsError(error_message)
cert_issuer.errors.InsufficientFundsError: Please add 133500 satoshis to the address myt59jbZC6PiXyef38q2sbdPM57eKd1r2M

1 Like

I can investigate later this week, maybe a testnet api went down. I thought there would be backups in place, but if it didn’t come back up, you may need to connect to your own bitcoin testnet node.

1 Like

Look like I also met the same problems. Any solutions to this?

There is no backup api for testnet, it only use blockexplorer
So far, i cannot find a workaround without changing the cert-issuer source

you can try to provide the “–blockcypher_api_token” and write a override method (spendables_for_address) in BlockcypherBroadcaster

The override method should look like this:

def spendables_for_address(self, address):
    Return a list of Spendable objects for the
    given bitcoin address.
    logging.debug('spendables_for_address %s', address)
    spendables = []
    url_append = "?unspentOnly=true&token=%s&includeScript=true" % self.api_token
    url = self.base_url +'/addrs/'+ address + url_append
    result = json.loads(urlopen(url).read().decode("utf8"))
    for txn in result.get("txrefs", []):
        coin_value = txn.get("value")
        script = h2b(txn.get("script"))
        previous_hash = h2b_rev(txn.get("tx_hash"))
        previous_index = txn.get("tx_output_n")
        spendables.append(Spendable(coin_value, script, previous_hash, previous_index))
    return spendables

If Anthony have time to further check, he probably will provide us a better solution

Created a ticket on it here: https://github.com/blockchain-certificates/cert-issuer/issues/150

Will try to get to it tomorrow.


I’m having the same problem… Any solutions to this ?

I haven’t had a chance to add other testnet api’s yet. Running your own testnet node and pointing cert-issuer should get you around this issue if you weren’t able to add any additional api’s either.

The lastest version, 2.0.19, should solve this problem.