python – RPC hook up with Umbrel


I’ve an Umbrel Node on my RaspberryPi4. It’s linked to the identical router as my Pc, however one way or the other I am unable to hook up with it utilizing python (bitcoinrpc).

My Code

rpc_user = "umbrel"
rpc_pass = "password"
rpc_host = "192.168.1.122"
rpc_port = "8332"
rpc_connection = f"http://{rpc_user}:{rpc_pass}@{rpc_host}:{rpc_port}"
print(rpc_connection)
rpc_client = AuthServiceProxy(rpc_connection, timeout=240)

This all the time ends in the identical error

Traceback (most up-to-date name final):
  File "/media/donbolli/code/python/bitcoin/crawler/check.py", line 10, in <module>
    rpc_client = AuthServiceProxy(rpc_connection, timeout=240)
  File "/media/donbolli/code/python/bitcoin/venv/lib/python3.10/site-packages/bitcoinrpc/authproxy.py", line 87, in __init__
    if self.__url.port is None:
  File "/usr/lib/python3.10/urllib/parse.py", line 185, in port
    increase ValueError(f"Port couldn't be forged to integer worth as {port!r}")
ValueError: Port couldn't be forged to integer worth as 'password'

What am I lacking? What is completed unsuitable?

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top