console
console copied to clipboard
python部署智能合约报错:TypeError: isinstance() arg 2 must be a type or tuple of types
(python-sdk) [root@slave03 python-sdk]# ./console.py call HelloWorld 0x9e028f06d7cd46d5d8651f2606bcd4dbf404150c set "Hello" "FISCO"
INFO >> user input : ['call', 'HelloWorld', '0x9e028f06d7cd46d5d8651f2606bcd4dbf404150c', 'set', 'Hello', 'FISCO']
INFO>> client info: channel 192.168.107.214:20200,groupid :1 INFO >> call HelloWorld , address: 0x9e028f06d7cd46d5d8651f2606bcd4dbf404150c, func: set, args:['Hello', 'FISCO'] exception happened! Traceback (most recent call last): File "/root/.pyenv/versions/python-sdk/lib/python3.7/site-packages/parsimonious/nodes.py", line 213, in visit return method(node, [self.visit(n) for n in node]) File "/data/pythoncode/python-sdk/eth_abi/grammar.py", line 99, in generic_visit if isinstance(node.expr, expressions.Optional): TypeError: isinstance() arg 2 must be a type or tuple of types
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./console.py", line 601, in main
result = tx_client.call_and_decode(fn_name, fn_args)
File "/data/pythoncode/python-sdk/client/common/transaction_common.py", line 202, in call_and_decode
result = super().call(self.contract_addr, contract_abi, fn_name, args)
File "/data/pythoncode/python-sdk/client/bcosclient.py", line 442, in call
functiondata = encode_transaction_data(fn_name, contract_abi, None, args)
File "/data/pythoncode/python-sdk/utils/contracts.py", line 209, in encode_transaction_data
fn_identifier, contract_abi, fn_abi, args, kwargs,
File "/data/pythoncode/python-sdk/utils/contracts.py", line 242, in get_function_info
fn_abi = find_matching_fn_abi(contract_abi, fn_name, args, kwargs)
File "/data/pythoncode/python-sdk/utils/contracts.py", line 89, in find_matching_fn_abi
function_candidates = pipe(abi, name_filter, arg_count_filter, encoding_filter)
File "cytoolz/functoolz.pyx", line 680, in cytoolz.functoolz.pipe
File "cytoolz/functoolz.pyx", line 655, in cytoolz.functoolz.c_pipe
File "/data/pythoncode/python-sdk/utils/abi.py", line 254, in filter_by_encodability
in contract_abi
File "/data/pythoncode/python-sdk/utils/abi.py", line 255, in
Parse tree: <Node matching ""> <-- *** We were here. ***