I have had some working code (coded in pybitshares) that recently encountered errors. I did not change the code so I was wondering if some pybitshares code changes was the cause of the new errors?
Here is a small snippet of code that illustrates the problem:
from pprint import pprint
from bitshares.account import Account
from bitshares.market import Market
#This code works fine...
marketObj = Market("OPEN.EOS:BTS")
t = marketObj.ticker()
print(t)
#Below generates an error (same code, different market parameter):
marketObj = Market("OPEN.EOSDAC:BTS")
t = marketObj.ticker()
print(t)
when I execute this code the result is:
python3 bug_report.py
{'latest': 79.72939583253 BTS/OPEN.EOS, 'core_exchange_rate': 66.11000000000 BTS/OPEN.EOS, 'quoteVolume': 450.907329 OPEN.EOS, 'lowestAsk': 81.46565644572 BTS/OPEN.EOS, 'highestBid': 79.72939583253 BTS/OPEN.EOS, 'percentChange': 6.97, 'baseVolume': 35,861.43141 BTS}
Traceback (most recent call last):
File "bug_report.py", line 11, in <module>
t = marketObj.ticker()
File "/home/plview/HUG/lib/python3.5/site-packages/bitshares/market.py", line 174, in ticker
data["percentChange"] = float(ticker["percent_change"])
ValueError: could not convert string to float:
Any ideas on what is causing this? Or how to correct it?