ValueError: invalid literal for int() with base 16: ''
See original GitHub issueDescription
Error while running mythril on truffle project through the docker container. A few contracts are analysed correctly, and then I see the following issue:
Traceback (most recent call last):
File "/usr/local/bin/myth", line 4, in <module>
__import__('pkg_resources').run_script('mythril==0.18.11', 'myth')
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 658, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1438, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/EGG-INFO/scripts/myth", line 9, in <module>
mythril.interfaces.cli.main()
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/mythril/interfaces/cli.py", line 147, in main
mythril.analyze_truffle_project(args)
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/mythril/mythril.py", line 183, in analyze_truffle_project
return analyze_truffle_project(self.sigs, *args, **kwargs) # just passthru by passing signatures for now
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/mythril/support/truffle.py", line 51, in analyze_truffle_project
sym = SymExecWrapper(ethcontract, address, args.strategy, max_depth=args.max_depth)
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/mythril/analysis/symbolic.py", line 30, in __init__
self.laser.sym_exec(address)
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/mythril/laser/ethereum/svm.py", line 61, in sym_exec
transaction.run(self.open_states, self)
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/mythril/laser/ethereum/transaction.py", line 58, in run
evm.exec()
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/mythril/laser/ethereum/svm.py", line 71, in exec
new_states, op_code = self.execute_state(global_state)
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/mythril/laser/ethereum/svm.py", line 97, in execute_state
new_global_states = Instruction(op_code, self.dynamic_loader).evaluate(global_state)
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/mythril/laser/ethereum/instructions.py", line 69, in evaluate
return instruction_mutator(global_state)
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/mythril/laser/ethereum/instructions.py", line 34, in wrapper
new_global_states = func(self, global_state_copy)
File "/usr/local/lib/python3.6/dist-packages/mythril-0.18.11-py3.6.egg/mythril/laser/ethereum/instructions.py", line 552, in codecopy_
int(bytecode[2*(concrete_code_offset + i): 2*(concrete_code_offset + i + 1)], 16)
ValueError: invalid literal for int() with base 16: ''
How to Reproduce
The repository I am trying to run this on, is a public repository: https://github.com/DigixGlobal/dao-contracts
$ docker run -v $(pwd):/tmp -w "/tmp/" mythril/myth --truffle
Environment
- OS
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
- Docker version:
$ docker --version
Docker version 18.06.1-ce, build e68fc7a
- Python version:
$ python --version
Python 3.5.6
$ python3 --version
Python 3.5.6
- Mythril version:
$ docker run mythril/myth --version
Mythril version v0.18.11
- Solidity compiler and version:
solc --version
$ solc --version
solc, the solidity compiler commandline interface
Version: 0.4.24+commit.e67f0147.Linux.g++
Issue Analytics
- State:
- Created 5 years ago
- Comments:27 (2 by maintainers)
Top Results From Across the Web
ValueError: invalid literal for int() with base 16: '\x0e\xa3' Python
So you need to change string w=int(x, 16) to w = struct.unpack("h", x)[0] or to w = struct.unpack("H", x)[0] , it depends on...
Read more >ValueError: invalid literal for int() with base 16 - Yawin Tutor
The int(val, 16) function converts the string to an integer if the string is a valid representation of the hex decimal number and...
Read more >What is the meaning of invalid literal for int() with base = ' '?
The chars a, b, c, d, e, and f are present in the base =16 system and therefore only these chars along with...
Read more >ValueError: invalid literal for int() with base 16: b'' #5583 - GitHub
Summary. I am just trying to make a http request on a certain website, the thing is I am making requests for a...
Read more >Getting ValueError: invalid literal for int() with base 16 - Reddit
When my code hits this line with Z0238984 as the input it gets a ValueError: Invalid literal for int() with base 16:.
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 FreeTop 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
Top GitHub Comments
Yeah the ‘—truffle’ option is broken
@birdofpreyru I used this command
docker run -v $(pwd):/tmp -w "/tmp/" mythril/myth --truffle
from within the truffle project directory