etheno icon indicating copy to clipboard operation
etheno copied to clipboard

ImportError (cannot import name 'register_log_callback') when running quickstart example

Open htadashi opened this issue 4 years ago • 8 comments

First of all, thanks for developing this awesome tool 🙇🏻‍♂️

I tried running the steps on quickstart, but I got the following error when running the example:

etheno@dafa852d5dc7:~/examples/BrokenMetaCoin$ etheno --truffle --ganache --manticore  --manticore-script ExploitMetaCoinManticoreScript.py
Traceback (most recent call last):
  File "/home/etheno/.local/bin/etheno", line 33, in <module>
    sys.exit(load_entry_point('etheno==0.2.4', 'console_scripts', 'etheno')())
  File "/home/etheno/.local/bin/etheno", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/home/etheno/.local/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 168, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/__main__.py", line 23, in <module>
    from .manticoreclient import ManticoreClient
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 25, in <module>
    import manticore.utils
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 20, in manticoreimport
    return oldimport(name, *args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/manticore/__init__.py", line 10, in <module>
    from .ethereum.manticore import ManticoreEVM
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 20, in manticoreimport
    return oldimport(name, *args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/manticore/ethereum/__init__.py", line 3, in <module>
    from .manticore import ManticoreEVM, config
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 20, in manticoreimport
    return oldimport(name, *args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/manticore/ethereum/manticore.py", line 15, in <module>
    from ..core.manticore import ManticoreBase, ManticoreError
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 20, in manticoreimport
    return oldimport(name, *args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/manticore/core/manticore.py", line 29, in <module>
    from .worker import (
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 20, in manticoreimport
    return oldimport(name, *args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/manticore/core/worker.py", line 5, in <module>
    from ..utils.log import register_log_callback
ImportError: cannot import name 'register_log_callback'

htadashi avatar Aug 28 '21 20:08 htadashi

It should be solved in #81. Please test.

gustavo-grieco avatar Sep 03 '21 07:09 gustavo-grieco

It should be solved in #81. Please test.

I still have this problem. Running it without --manticore doesn't seem to matter so I'm really not sure what to do here. I am trying to run it natively (ubuntu 18.06) if it matters

bobdabear avatar Sep 17 '21 07:09 bobdabear

@ggrieco-tob Sorry for the late reply! I didn't see the Github notification. Using the image trailofbits/etheno:latest and running the quickstart again results in the same problem (even without manticore flags). I am using WSL2 and Docker version 20.10.8.

htadashi avatar Sep 17 '21 11:09 htadashi

same problem occurs here, I am using trailofbits/etheno image and running in the docker container but etheno --help nor etheno works. Every command involving etheno returns with the same register_log_callback error.

MJarirUddin avatar Sep 25 '21 13:09 MJarirUddin

same problem here, i used pip3 install for manticore and etheno

mentalrob avatar Dec 11 '21 11:12 mentalrob

yes same issue here

$ docker pull trailofbits/etheno                                                                                                                                                                  
Using default tag: latest
...
$docker run -it trailofbits/etheno
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

$etheno@7287a3bfcab3:/src$ etheno
Traceback (most recent call last):
  File "/home/etheno/.local/bin/etheno", line 33, in <module>
    sys.exit(load_entry_point('etheno==0.2.4', 'console_scripts', 'etheno')())
  File "/home/etheno/.local/bin/etheno", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/home/etheno/.local/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 194, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/__main__.py", line 23, in <module>
    from .manticoreclient import ManticoreClient
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 25, in <module>
    import manticore.utils
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 20, in manticoreimport
    return oldimport(name, *args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/manticore/__init__.py", line 10, in <module>
    from .ethereum.manticore import ManticoreEVM
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 20, in manticoreimport
    return oldimport(name, *args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/manticore/ethereum/__init__.py", line 3, in <module>
    from .manticore import ManticoreEVM, config
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 20, in manticoreimport
    return oldimport(name, *args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/manticore/ethereum/manticore.py", line 15, in <module>
    from ..core.manticore import ManticoreBase, ManticoreError
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 20, in manticoreimport
    return oldimport(name, *args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/manticore/core/manticore.py", line 29, in <module>
    from .worker import (
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/manticoreclient.py", line 20, in manticoreimport
    return oldimport(name, *args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/manticore/core/worker.py", line 5, in <module>
    from ..utils.log import register_log_callback
ImportError: cannot import name 'register_log_callback'

clemsos avatar Jan 25 '22 12:01 clemsos

Same issue here

jrocco2 avatar Jan 25 '22 17:01 jrocco2

If you need a temporary workaround for this issue, you may downgrade manticore to avoid the problem: pip install manticore==0.3.5

elopez avatar Feb 20 '22 18:02 elopez