Skip to content

Timeout error on Dash and Doge while using unspent #55

Description

@x011

I'm getting the error below while using the unspent function on Dash and Doge. Any idea why? Is there a way to increase the timeout or change the blockchain provider for these two coins?

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\coins_async\base.py", line 397, in unspent
    unspents = await self.client.unspent(value)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\electrumx_client\client.py", line 508, in unspent
    return await self.send_request("blockchain.scripthash.listunspent", scripthash)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\electrumx_client\client.py", line 389, in send_request
    await self._ensure_connected()
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\electrumx_client\client.py", line 351, in _ensure_connected
    done, pending = await asyncio.wait([is_connected_task, self._connection_task],
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 384, in wait
    return await _wait(fs, timeout, return_when, loop)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 491, in _wait
    await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\User\Desktop\wallets\py_bitcoinlib\btc_wallet.py", line 302, in <module>
    balance, balance_float = balance(wallet, network, args.testnet)
  File "C:\Users\User\Desktop\wallets\py_bitcoinlib\btc_wallet.py", line 198, in balance
    inputs = coin.unspent(wallet[network]['addr1'])
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\coins\base.py", line 152, in unspent
    return self._run_async("unspent", addr, merkle_proof=merkle_proof)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\coins\base.py", line 84, in _run_async
    return fut.result(timeout=self.timeout * 2)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 458, in result
    return self.__get_result()
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
    raise self._exception
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\coins\base.py", line 68, in run
    result = await asyncio.wait_for(coro, timeout=self.timeout)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions