Search code examples
pythonpipblockchainrethinkdb-python

ImportError: Cannot import name 'Asset' bigchaindb


I've installed bigchaindb correctly (I believe) but I keep getting an error when I run the following python command

from bigchaindb_driver import BigchaindDB

  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/site-packages/bigchaindb_driver/__init__.py", line 1, in <module>
from .driver import BigchainDB   # noqa
  File "/usr/local/lib/python3.5/site-packages/bigchaindb_driver/driver.py", line 2, in <module>
from .offchain import prepare_transaction, fulfill_transaction
 File "/usr/local/lib/python3.5/site-packages/bigchaindb_driver/offchain.py", line 18, in <module>
from .utils import (
File "/usr/local/lib/python3.5/site-packages/bigchaindb_driver/utils.py", line 9, in <module>
from bigchaindb.common.transaction import Asset
ImportError: cannot import name 'Asset'

Any ideas on what is causing the errors?


Solution

  • I took a look at bigchaindb.common.transaction module source code and it looks like there is no Asset name in this module. The reason might be that Asset was removed in newer version of bigchaindb.

    So are you sure you have bigchaindb_driver version compatible with version of bigchaindb ?