ValueError: invalid literal for int() with base 10: 'LID'`
See original GitHub issueEnvironment information
brownie
Version: masterganache-cli
Version: v6.12.1solc
Version: 0.6.12- Python Version: 3.9
- OS: linux
What was wrong?
code compiles fine before
File "/usr/local/lib/python3.8/dist-packages/brownie/_cli/__main__.py", line 64, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "/usr/local/lib/python3.8/dist-packages/brownie/_cli/console.py", line 47, in main
active_project = project.load()
File "/usr/local/lib/python3.8/dist-packages/brownie/project/main.py", line 702, in load
return Project(name, project_path)
File "/usr/local/lib/python3.8/dist-packages/brownie/project/main.py", line 164, in __init__
self.load()
File "/usr/local/lib/python3.8/dist-packages/brownie/project/main.py", line 217, in load
self._compile(changed, self._compiler_config, False)
File "/usr/local/lib/python3.8/dist-packages/brownie/project/main.py", line 90, in _compile
build_json = compiler.compile_and_format(
File "/usr/local/lib/python3.8/dist-packages/brownie/project/compiler/__init__.py", line 146, in compile_and_format
build_json.update(generate_build_json(input_json, output_json, compiler_data, silent))
File "/usr/local/lib/python3.8/dist-packages/brownie/project/compiler/__init__.py", line 309, in generate_build_json
build_json[contract_name] = solidity._get_unique_build_json(
File "/usr/local/lib/python3.8/dist-packages/brownie/project/compiler/solidity.py", line 246, in _get_unique_build_json
pc_map, statement_map, branch_map = _generate_coverage_data(
File "/usr/local/lib/python3.8/dist-packages/brownie/project/compiler/solidity.py", line 349, in _generate_coverage_data
pc += int(pc_list[-1]["op"][4:])
ValueError: invalid literal for int() with base 10: 'LID'
How can it be fixed?
no idea how to debug
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ValueError: invalid literal for int() with base 10: '' - Stack Overflow
The reason is that you are getting an empty string or a string as an argument into int. Check if it ...
Read more >ValueError: invalid literal for int() with base 10
The error message invalid literal for int() with base 10 would seem to indicate that you are passing a string that's not an...
Read more >ValueError: invalid literal for int() with base 10 in Python
The Python "ValueError: invalid literal for int() with base 10" occurs when we pass a string that cannot be directly converted to an...
Read more >Python ValueError: invalid literal for int() with base 10
This error can frequently occur when converting user-input to an integer-type using the int() function. This problem happens because Python stores the input...
Read more >Python ValueError: invalid literal for int() with base 10 Solution
The Python ValueError: invalid literal for int() with base 10 error is raised when you try to convert a string value that is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
the failure came from this contract https://github.com/rapidtrade-io/launchswap/blob/master/contracts/PCert.sol
compiled fine on ropsten and remix, so wasn’t sure where to start
Took a look, this is happening because under certain conditions the solidity source map is too long. I’m not sure why solidity does this, but Brownie now handles it gracefully.