Friday, September 20, 2024
HomeBitcoinAssist: Unable to attach utilizing bitcoinrpc in python to my native bitcoin...

Assist: Unable to attach utilizing bitcoinrpc in python to my native bitcoin node


For the lifetime of me I am unable to determine this out…

I used to be having bother getting my machine to port ahead 8332, however 8333 appeared wonderful, so I ended up transferring my rpcport to 8334, which appears to attach now however I hold getting this error now on the next python script…

My Python Script(named bitcoin104.py)

from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
# rpc_user and rpc_password are set within the bitcoin.conf file
#rpc_user = "myusername"
#rpc_password = "myuserpass"
rpc_connection = AuthServiceProxy("http://myusername:[email protected]:8334")
print(rpc_connection.get_info())

When i run it I get the next error…

PS D:PROJECTSpython38_env_bitcoinsrchellobitcoin101> python .bitcoin104.py
Traceback (most up-to-date name final):
  File ".bitcoin104.py", line 8, in 
    print(rpc_connection.get_info())
  File "D:PROJECTSpython38_env_bitcoin.venvlibsite-packagesbitcoinrpcauthproxy.py",
line 139, in __call__
    response = self._get_response()
  File "D:PROJECTSpython38_env_bitcoin.venvlibsite-packagesbitcoinrpcauthproxy.py", line 179, in _get_response
    http_response = self.__conn.getresponse()
  File "c:usershansoappdatalocalprogramspythonpython38libhttpclient.py", line 1344, in getresponse
    response.start()
  File "c:usershansoappdatalocalprogramspythonpython38libhttpclient.py", line 307, in start
    model, standing, motive = self._read_status()
  File "c:usershansoappdatalocalprogramspythonpython38libhttpclient.py", line 276, in _read_status
    increase RemoteDisconnected("Distant finish closed connection with out"*
http.shopper.RemoteDisconnected: Distant finish closed connection with out response

Listed below are all of the choices i’ve set in my bitcoin.conf file in my native listing for bitcoin…

*port=8333
timeout=30
printtoconsole=1
chain=important
#rpcallowip=127.0.0.1
rpcpassword=myuserpass
rpcport=8334
rpcuser=myusername
server=1*

I ended up commenting out rpcallowip simply to present it the very best probability of working…

Must also word the node appears to be working wonderful in any other case, so it’s positively up and working, and once I was first enjoying round with setup I left the port open for a day and had exterior connections occurring… So i believe that’s setup okay. Different then attainable one thing I’m doing mistaken with the bitcoin.conf file.

And since I switched to port 8334 from 8332 I’m at the very least no longer getting a machine/host blocked request message. It appears to at the very least be speaking with the node now as effectively. However for some motive it would not appear to love the question?

I don’t know what I’m doing mistaken? Any assist could be drastically appreciated as have been banging my head towards the monitor all day on this now….

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments