File ~/Desktop/kite/kite-venv-v1/lib/python3.9/site-packages/dateutil/parser/_parser.py:1235, in parser._build_naive(self, res, default) 1233 repl['day'] = monthrange(cyear, cmonth)[1] -> 1235 naive = default.replace(**repl) 1237 if res.weekday is not None and not res.day:
ValueError: year 0 is out of range
The above exception was the direct cause of the following exception:
KiteConnect latest version failing in order_trades(). kiteconnect version: kiteconnect-5.2.0 kite.order_trades(order_id=) raises: dateutil.parser.ParserError: year 0 is out of range: 0000-01-01 09:15:25 Checked on latest kiteconnect. The API response appears to contain an invalid zero-year timestamp which the SDK attempts to parse in _format_response before returning. kite.orders() works for the same order_id.
Still not working. I am getting 200 and legit response from the API, kite.order_trades python SDK is failing coz order_timestamp ("order_timestamp":"0000-01-01 09:15:25") is malformed. This was working perfectly till yesterday. PLS check python SDK on kiteconnect 5.2.0 (latest), response itself is working (curl might be too). ------ import kiteconnect print(kiteconnect.__version__.__version__) # > 5.2.0
kiteconnect version: kiteconnect-5.2.0
kite.order_trades(order_id=) raises: dateutil.parser.ParserError: year 0 is out of range: 0000-01-01 09:15:25
Checked on latest kiteconnect. The API response appears to contain an invalid zero-year timestamp which the SDK attempts to parse in _format_response before returning.
kite.orders() works for the same order_id.
----------------------- Output:
200
{'status': 'success',
'data': [
{
'average_price': 190.13,
'quantity': 5,
'trade_id': '60*******',
'product': 'MIS',
'order_timestamp': '0000-01-01 09:15:25',
'fill_timestamp': '2026-07-03 09:15:25',
'exchange_timestamp': '2026-07-03 09:15:25',
'exchange_order_id': '130****3',
'order_id': '260******',
'transaction_type': 'BUY',
'tradingsymbol': 'TATASTEEL',
'exchange': 'NSE',
'instrument_token': 895745
}
]
}
------
import kiteconnect
print(kiteconnect.__version__.__version__) # > 5.2.0