Error while connecting to smartAPI
-
my smartAPI was just working fine till yesterday evening. But I suddenly started getting below error out of the blue.
lib\site-packages\smartapi\smartConnect.py", line 188, in request
data = json.loads(r.content.decode("utf8"))
File "c:\python39\lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
File "c:\python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)During handling of the above exception, another exception occurred:
File "...<module>
userProfile= obj.getProfile(refreshToken)
File "...site-packages\smartapi\smartConnect.py", line 279, in getProfile
user=self._getRequest("api.user.profile",{"refreshToken":refreshToken})
File "...\site-packages\smartapi\smartConnect.py", line 223, in _getRequest
return self._request(route, "GET", params)
File "C:\Users\Hemant\Desktop\Trade Study\Algo\algoenv\lib\site-packages\smartapi\smartConnect.py", line 191, in _request
raise ex.DataException("Couldn't parse the JSON response received from the server: {content}".format(
smartapi.smartExceptions.DataException: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate' -
I am facing similar error while logging into account using SmartAPI.
After multiple attempts login is successful but other API calls are getting interrupted by this json.decoder.JSONDecodeError error. -
@leena-1234 @admin Everyone is facing same issue... session is getting expired in few seconds... And all requests are failing..
-
HI @lakshmi_73 This has been noted we will update you once fixed.
-
HI @whemant This has been fixed.