Skip to content
This repository has been archived by the owner on Feb 14, 2025. It is now read-only.

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

Open
htadashi opened this issue Aug 28, 2021 · 8 comments

Comments

@htadashi
Copy link

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'
@ggrieco-tob
Copy link
Member

It should be solved in #81. Please test.

@bobdabear
Copy link

bobdabear commented Sep 17, 2021

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

@htadashi
Copy link
Author

htadashi commented Sep 17, 2021

@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.

@MJarirUddin
Copy link

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.

@mentalrob
Copy link

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

elopez added a commit to elopez/etheno that referenced this issue Dec 30, 2021
Manticore 0.3.6 causes issues when running etheno, see issue
crytic#80 for the details.
@clemsos
Copy link

clemsos commented Jan 25, 2022

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'

@jrocco2
Copy link

jrocco2 commented Jan 25, 2022

Same issue here

@elopez
Copy link
Member

elopez commented Feb 20, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants