Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: no key for given address or file #18

Open
konradweiss opened this issue May 8, 2018 · 0 comments
Open

ValueError: no key for given address or file #18

konradweiss opened this issue May 8, 2018 · 0 comments

Comments

@konradweiss
Copy link

I came far in getting to run MAIAN. Some code changes where necessary to arrive there. Now However I struggle with a different problem which suggests that the addresses used for testing are not existent in the beginning and have to be created before 'unlocked'. Is that true? Do we have to do that and how? Following the execution do check for prodigal and greedy contracts, in both cases I get the same error:

python3 tool/maian.py -c 0 -s tool/example_contracts/example_prodigal.sol Adoption

===========================================================================
[ ] Compiling Solidity contract from the file tool/example_contracts/example_prodigal.sol ... Done
[ ] Connecting to PRIVATE blockchain emptychain ... ESTABLISHED
[ ] Deploying contract Traceback (most recent call last):
File "tool/maian.py", line 182, in
main(sys.argv[1:])
File "tool/maian.py", line 120, in main
if args.soliditycode: contract_address = deploy_contract(args.soliditycode[1], MyGlobals.etherbase_account)
File "/home/kweiss/ma/MAIAN/tool/contracts.py", line 87, in deploy_contract
MyGlobals.web3.personal.unlockAccount(etherbase, '1', 15000)
File "/usr/local/lib/python3.5/dist-packages/web3-4.2.0-py3.5.egg/web3/personal.py", line 43, in unlockAccount
[account, passphrase, duration],
File "/usr/local/lib/python3.5/dist-packages/web3-4.2.0-py3.5.egg/web3/manager.py", line 106, in request_blocking
raise ValueError(response["error"])
ValueError: {'message': 'no key for given address or file', 'code': -32000}

python3 tool/maian.py -c 1 -s tool/example_contracts/example_prodigal.sol Adoption

==========================================================================
[ ] Compiling Solidity contract from the file tool/example_contracts/example_prodigal.sol ... Done
[ ] Connecting to PRIVATE blockchain emptychain ... ESTABLISHED
[ ] Sending Ether to contract 0x56cb4a3c85a2f5b4819b93739e536236abf2288a7864c6a1afaa4cb98d464306 Traceback (most recent call last):
File "tool/maian.py", line 182, in
main(sys.argv[1:])
File "tool/maian.py", line 116, in main
execute_transactions([{'from':'0x'+MyGlobals.sendingether_account,'to':supposed_contract_address,'value':MyGlobals.send_initial_wei}])
File "/home/kweiss/ma/MAIAN/tool/blockchain.py", line 95, in execute_transactions
MyGlobals.web3.personal.unlockAccount(tx['from'],'1',15000)
File "/usr/local/lib/python3.5/dist-packages/web3-4.2.0-py3.5.egg/web3/personal.py", line 43, in unlockAccount
[account, passphrase, duration],
File "/usr/local/lib/python3.5/dist-packages/web3-4.2.0-py3.5.egg/web3/manager.py", line 106, in request_blocking
raise ValueError(response["error"])
ValueError: {'code': -32000, 'message': 'no key for given address or file'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant