BitShares Forum

Main => Technical Support => Topic started by: david987 on May 01, 2018, 04:27:55 am

Title: Python blockchain_instance error when calling orderbook() -
Post by: david987 on May 01, 2018, 04:27:55 am
Using this simple example:
Code: [Select]
from bitshares import BitShares
from bitshares.market import Market

bs = BitShares( 'wss://bitshares.openledger.info/ws', nobroadcast=True )

market = Market("BTS:USD", bitshares_instance=bs)
book = market.orderbook()


Throws this error
Code: [Select]
Traceback (most recent call last):
  File "test.py", line 7, in <module>
    book = market.orderbook()
  File "/home/masternode/.local/lib/python3.5/site-packages/bitshares/market.py", line 235, in orderbook
    ), orders["asks"]))
  File "/home/masternode/.local/lib/python3.5/site-packages/bitshares/market.py", line 234, in <lambda>
    blockchain_instance=self.blockchain
  File "/home/masternode/.local/lib/python3.5/site-packages/bitshares/price.py", line 484, in __init__
    super(Order, self).__init__(*args, blockchain_instance=self.blockchain, **kwargs)
TypeError: __init__() got multiple values for keyword argument 'blockchain_instance'

No idea why it's not working, any pointers?

Thanks.
Title: Re: Python blockchain_instance error when calling orderbook() -
Post by: xeroc on May 01, 2018, 03:36:58 pm
This is a bug that came as I was trying to make code more compatible with other graphene chains.
It should be fixed in latest develop branch .. sorry for the inconvenience.