I'm running a local Parity node for the testnet (Ropsten) on Debian (Jessie). I'm using web3.py to connect to this node and create transactions.
I've created a new account:
parity account new --chain ropsten
I'm running my parity node with the following options
/usr/bin/parity --chain ropsten --no-ui --rpcapi 'eth,web3,personal' --jsonrpc-interface 127.0.0.1 --bootnodes 'enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303'
When I test this node, it's running fine, see the following python shell:
Python 3.4.2 (default, Oct 8 2014, 10:45:20)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from web3 import Web3, KeepAliveRPCProvider, IPCProvider
>>> web3 = Web3(KeepAliveRPCProvider(host='localhost', port='8545'))
>>> web3.eth.blockNumber
1012932
However, when I try to unlock my account it returns False (with a proper account hash and password ofcourse)
>>> web3.personal.unlockAccount('my-account-hash', 'some-password')
False
When I check if it's actually in my list of accounts, I get the following empty array:
>>> web3.personal.listAccounts
[]
However, when I check in parity:
parity account list --chain ropsten
It lists 3 accounts. Why is it not showing in the listAccounts? Do I have to make the account available somehow?
From what I can understand that when you created account with parity it created an ethereum account and stored that key and password in the parity's keystore file. This file can be different from the keystore file that the web3 calls are accessing, the geth keystore file. This seems to be the most likely reason in your case.
Try to locate parity's keystore file and the keystore file the web3 calls are pointing to.
Generally parity's keystore will be located in
~/.local/share/io.parity.ethereum/keys/
and the geths one in your install directory or the home directory.
When you do locate them you can get the geth to access those keys by just manually copying it.