I have been playing around a bit with Bitcoin Core (version 23.0), more specifically connecting to different wallets in Bitcoin Core through RPC in Python. I have found this library and tried to connect to my wallet(s) using this code:

from bitcoinrpc.authproxy import AuthServiceProxy

conn = AuthServiceProxy("http://myusername:mypassword@")

But when running this i get this stacktrace:

Traceback (most recent call last):
  File "/home/kebab/Desktop/pron/testing.py", line 24, in <module>
  File "/home/kebab/.local/lib/python3.8/site-packages/bitcoinrpc/authproxy.py", line 141, in __call__
    raise JSONRPCException(response['error'])
bitcoinrpc.authproxy.JSONRPCException: -18: Requested wallet does not exist or is not loaded

Though what I have noticed is that if i load the wallet using bitcoin-cli -testnet loadwallet testingwallet. Then i can run RPC commands but only get info from that wallet!

And I have created my wallet using: bitcoin-cli -testnet createwallet testingwallet

Any help on this would really be appreciated!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.