Closed dan-da closed 6 years ago
I get this error when trying to lookup a non-existent asset.
$ counterparty-client asset XYZ [2016-08-22 11:03:23][INFO] Running v1.1.2 of counterparty-client. [2016-08-22 11:03:23][ERROR] API Exception: {'args': ('XYZ',), 'message': "'XYZ'", 'type': 'KeyError'} Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/jsonrpc/manager.py", line 108, in _get_responses result = method(*request.args, **request.kwargs) File "/usr/local/lib/python3.4/dist-packages/counterparty_lib-9.55.0-py3.4.egg/counterpartylib/lib/api.py", line 503, in get_supply return util.asset_supply(db, asset) File "/usr/local/lib/python3.4/dist-packages/counterparty_lib-9.55.0-py3.4.egg/counterpartylib/lib/util.py", line 520, in asset_supply supply = creations(db)[asset] KeyError: 'XYZ' Unhandled Exception Traceback (most recent call last): File "/usr/local/bin/counterparty-client", line 9, in <module> load_entry_point('counterparty-cli==1.1.2', 'console_scripts', 'counterparty-client')() File "/home/counterpartycoin/counterparty-cli/counterpartycli/__init__.py", line 12, in client_main client.main() File "/home/counterpartycoin/counterparty-cli/counterpartycli/client.py", line 247, in main view = console.get_view(args.action, args) File "/home/counterpartycoin/counterparty-cli/counterpartycli/console.py", line 10, in get_view return wallet.asset(args.asset) File "/home/counterpartycoin/counterparty-cli/counterpartycli/wallet/__init__.py", line 121, in asset supply = api('get_supply', {'asset': asset_name}) File "/home/counterpartycoin/counterparty-cli/counterpartycli/util.py", line 92, in api return rpc(config.COUNTERPARTY_RPC, method, params=params, ssl_verify=config.COUNTERPARTY_RPC_SSL_VERIFY) File "/home/counterpartycoin/counterparty-cli/counterpartycli/util.py", line 89, in rpc raise RPCError('{}'.format(response_json['error'])) counterpartycli.util.RPCError: {'message': 'Server error', 'code': -32000, 'data': {'type': 'KeyError', 'args': ['XYZ'], 'message': "'XYZ'"}}
Duplicate of #48
I get this error when trying to lookup a non-existent asset.