Bitcoin Forum
April 28, 2024, 04:23:18 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Problems with multiple wallets on RPC in bitcoin-core on: May 11, 2022, 06:27:49 PM
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@127.0.0.1:18332/wallet/testingwallet")
print(conn.getwalletinfo())
--------
But when running this i get this stacktrace:
-----------
Traceback (most recent call last):
  File "/home/kebab/Desktop/pron/testing.py", line 24, in <module>
    print(a.getwalletinfo())
  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!
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!