I have an Umbrel Node on my RaspberryPi4. I’m connected to the same router as my computer, but I can’t connect 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)
I always get the same error.
Traceback (most recent call last):
File "/media/donbolli/code/python/bitcoin/crawler/test.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
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’s wrong?