Tryed to run this code :
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import logging
import json
logging.basicConfig()
logging.getLogger("BitcoinRPC").setLevel(logging.DEBUG)
rpc_connection = AuthServiceProxy("http://%s:%[email protected]:18332"%('user', 'password'))
print(rpc_connection.getinfo())
with my pass and my username but I have this error:
DEBUG:BitcoinRPC:-1-> getinfo []
Traceback (most recent call last):
File "/home/conio/Scrivania/conioclass/conio/components/provaRPC.py", line 9, in <module>
print(rpc_connection.getinfo())
File "/home/conio/Scrivania/conioclass/conio/components/bitcoinrpc/authproxy.py", line 139, in __call__
response = self._get_response()
File "/home/conio/Scrivania/conioclass/conio/components/bitcoinrpc/authproxy.py", line 187, in _get_response
'code': -342, 'message': 'non-JSON HTTP response with \'%i %s\' from server' % (http_response.status, http_response.reason)})
bitcoinrpc.authproxy.JSONRPCException: -342: non-JSON HTTP response with '401 Unauthorized' from server
Can you help me?