Hi There,
I am using import bitcoinrpc.authproxy for regtest like below:
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
rpc_connection = AuthServiceProxy("http://%s:%s@127.0.0.1:18444"%("bitcoin", "bitcoin"),timeout = 120)
Upon running the above code, I am getting the below http error:
~/Doc/code/pythonprojects python -u "/Users/re/Documents/code/pythonprojects/mini_initial.py"
Traceback (most recent call last):
File "/Users/re/Documents/code/pythonprojects/mini_initial.py", line 17, in <module>
regTestChainSize = get_blockchain_size()
File "/Users/re/Documents/code/pythonprojects/mini_initial.py", line 5, in get_blockchain_size
iBlockSize = rpc_connection.getblockcount()
File "/Users/re/Documents/code/pythonprojects/venv/lib/python3.9/site-packages/bitcoinrpc/authproxy.py", line 139, in __call__
response = self._get_response()
File "/Users/re/Documents/code/pythonprojects/venv/lib/python3.9/site-packages/bitcoinrpc/authproxy.py", line 179, in _get_response
http_response = self.__conn.getresponse()
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1349, in getresponse
response.begin()
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
We can see that there is a `Remote end closed connection without response` error, any idea what could be causing this connection issue on regtest?
Thanks