It looks like you're new here. If you want to get involved, click one of these buttons!
positions = kite.positions()
jsonData = positions["net"]
...
for item in jsonData:
last_price = item.get("last_price")
...
is it possible that the attribute "last_price" in those positions have value 0.00 or some other corrupt data, even when the rest of the positions json output and structure are correct?
The intermittent solution is to fetch last price from ticker or get quote when it happens.