I have an Umbrel Node on my RaspberryPi4. It is connected to the same router as my Computer, but somehow I can’t connect to it using 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 always results in the same error
Traceback (most recent call last):
File "/media/donbolli/code/python/bitcoin/crawler/test.py", line 10, in
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
raise ValueError(f"Port could not be cast to integer value as {port!r}")
ValueError: Port could not be cast to integer value as 'password'
What am I missing? What is done wrong?