Got this error - raise ex.DataException("Unknown Content-Type ({content_type}) with response: ({content})".format( kiteconnect.exceptions.DataException: Unknown Content-Type (text/html) with response: (b'\r\n502 Bad Gateway\r\n\r\n
502 Bad Gateway
\r\n
cloudflare
\r\n\r\n\r\n') when trying to access the kite.orders() endpoint, was working fine till 2.05 PM.
Hi Sujith, thanks for the response. It’s run from local system. Had a doubt if it was an issue between isp and cdn, anything else I can do from my end to make sure the code doesn’t break? I’ve been running this for a few months, facing 502 for the first time. Thanks
Traceback (most recent call last):
File "/Users/akashram/PycharmProjects/Zerodha Algo/src/Test.py", line 1065, in
orders = kite.orders()
^^^^^^^^^^^^^
File "/Users/akashram/PycharmProjects/Zerodha Algo/.venv/lib/python3.12/site-packages/kiteconnect/connect.py", line 416, in orders
return self._format_response(self._get("orders"))
^^^^^^^^^^^^^^^^^^^
File "/Users/akashram/PycharmProjects/Zerodha Algo/.venv/lib/python3.12/site-packages/kiteconnect/connect.py", line 861, in _get
return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/akashram/PycharmProjects/Zerodha Algo/.venv/lib/python3.12/site-packages/kiteconnect/connect.py", line 943, in _request
raise ex.DataException("Unknown Content-Type ({content_type}) with response: ({content})".format(
kiteconnect.exceptions.DataException: Unknown Content-Type (text/html) with response: (b'\r\n502 Bad Gateway\r\n\r\n
502 Bad Gateway