AttributeError: 'float' object has no attribute '_blockchain'
bitphage opened this issue · comments
Vladimir Kamarzin commented
I tried latest master (573c5db) + graphenelib 1.1.10, and gon an error:
Traceback (most recent call last):
File "./test_graphene_no_attrib_blockchain.py", line 12, in <module>
market.orderbook()
File "/home/vvk/devel/golos/python-bitshares/bitshares/market.py", line 249, in orderbook
orders["asks"],
File "/home/vvk/devel/golos/python-bitshares/bitshares/market.py", line 247, in <lambda>
blockchain_instance=self.blockchain,
File "/home/vvk/devel/golos/python-bitshares/bitshares/price.py", line 146, in __init__
Price.__init__(*args, **kwargs)
File "/home/vvk/.local/share/virtualenvs/market-scripts-BfRrkhQ4/lib/python3.6/site-packages/graphenecommon/instance.py", line 34, in __init__
slf.__init__(self, *args, **kwargs)
File "/home/vvk/devel/golos/python-bitshares/bitshares/instance.py", line 14, in __init__
AbstractBlockchainInstanceProvider.__init__(self, *args, **kwargs)
File "/home/vvk/.local/share/virtualenvs/market-scripts-BfRrkhQ4/lib/python3.6/site-packages/graphenecommon/instance.py", line 22, in __init__
self._blockchain = None
AttributeError: 'float' object has no attribute '_blockchain'
Here is the example code:
#!/usr/bin/env python
from bitshares import BitShares
from bitshares.asset import Asset
from bitshares.market import Market
bitshares = BitShares()
quote = Asset('RUDEX.GOLOS', bitshares_instance=bitshares)
base = Asset('RUBLE', bitshares_instance=bitshares)
market = Market(bitshares_instance=bitshares, base=base, quote=quote)
market.orderbook()
Fabian Schuh commented
Resolved in develop
new release candidate coming