Open pipermerriam opened 3 years ago
I think this is the same bug.
return self.visit(getattr(self.grammar, method_name)(text, pos=pos))
File "/home/web/venv/lib/python3.7/site-packages/parsimonious/grammar.py", line 115, in parse
return self.default_rule.parse(text, pos=pos)
File "/home/web/venv/lib/python3.7/site-packages/parsimonious/expressions.py", line 120, in parse
node = self.match(text, pos=pos)
File "/home/web/venv/lib/python3.7/site-packages/parsimonious/expressions.py", line 137, in match
raise error
parsimonious.exceptions.ParseError: Rule 'type' didn't match at '
)' (line 1, column 2).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/web/ethereum-function-signature-registry/func_sig_registry/utils/solidity.py", line 185, in normalize_function_signature
args_tuple_type = parse_type(normalize_type(f'({args})'))
File "/home/web/venv/lib/python3.7/site-packages/eth_abi/grammar.py", line 125, in parse
raise ParseError(e.text, e.pos, e.expr)
eth_abi.exceptions.ParseError: Parse error at '
' (column 2) in type string '(
)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/web/venv/lib/python3.7/site-packages/huey/consumer.py", line 151, in process_task
self.huey.execute(task)
File "/home/web/venv/lib/python3.7/site-packages/huey/api.py", line 266, in execute
result = task.execute()
File "/home/web/venv/lib/python3.7/site-packages/huey/api.py", line 560, in execute
return func(*args, **kwargs)
File "/home/web/venv/lib/python3.7/site-packages/huey/contrib/djhuey/__init__.py", line 91, in inner
return fn(*args, **kwargs)
File "/home/web/ethereum-function-signature-registry/func_sig_registry/registry/tasks.py", line 32, in perform_github_import
Signature.import_from_solidity_file(solidity_file)
File "/home/web/ethereum-function-signature-registry/func_sig_registry/registry/models.py", line 109, in import_from_solidity_file
return cls.import_from_solidity_code(code)
File "/home/web/ethereum-function-signature-registry/func_sig_registry/registry/models.py", line 102, in import_from_solidity_code
for raw_signature in function_signatures
File "/home/web/ethereum-function-signature-registry/func_sig_registry/registry/models.py", line 102, in <listcomp>
for raw_signature in function_signatures
File "/home/web/ethereum-function-signature-registry/func_sig_registry/registry/models.py", line 87, in import_from_raw_text_signature
text_signature = normalize_function_signature(raw_function_signature)
File "/home/web/ethereum-function-signature-registry/func_sig_registry/utils/solidity.py", line 189, in normalize_function_signature
arg_types = ','.join(get_arg_types(args))
File "/home/web/ethereum-function-signature-registry/func_sig_registry/utils/solidity.py", line 169, in get_arg_types
types = [p.strip().split(maxsplit=1)[0] for p in parts]
File "/home/web/ethereum-function-signature-registry/func_sig_registry/utils/solidity.py", line 169, in <listcomp>
types = [p.strip().split(maxsplit=1)[0] for p in parts]
IndexError: list index out of range
What is wrong?
This error was reported in production:
How can it be fixed
Looks like just exception handling that needs to be put in place