GolosChain / golos-python

Official Python Library for Golos Blockchain
MIT License
3 stars 4 forks source link

ImportError: cannot import name 'PublicKey' #18

Open bitphage opened 6 years ago

bitphage commented 6 years ago

Circular import error

Python 3.6.1 (default, Sep  6 2017, 16:18:23) 
[GCC 5.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> from steembase.account import Publickey
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vvk/devel/golos/golos-python/steembase/account.py", line 5, in <module>
    from steem.utils import compat_bytes, compat_chr
  File "/home/vvk/devel/golos/golos-python/steem/__init__.py", line 2, in <module>
    from .steem import Steem
  File "/home/vvk/devel/golos/golos-python/steem/steem.py", line 1, in <module>
    from .commit import Commit
  File "/home/vvk/devel/golos/golos-python/steem/commit.py", line 10, in <module>
    from steembase import memo
  File "/home/vvk/devel/golos/golos-python/steembase/memo.py", line 10, in <module>
    from .operations import Memo
  File "/home/vvk/devel/golos/golos-python/steembase/operations.py", line 8, in <module>
    from .account import PublicKey
ImportError: cannot import name 'PublicKey'
>>> 
crokkon commented 6 years ago

workaround: import Steem first

>>> from steem import Steem
>>> from steembase.account import PublicKey