Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Error while connecting to smartAPI

    Python SDK
    4
    5
    52
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      whemant last edited by whemant

      @admin

      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'

      L A 2 Replies Last reply Reply Quote 0
      • L
        leena.1234 @whemant last edited by

        @admin

        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.

        L 1 Reply Last reply Reply Quote 0
        • L
          lakshmi_73 @leena.1234 last edited by

          @leena-1234 @admin Everyone is facing same issue... session is getting expired in few seconds... And all requests are failing..

          A 1 Reply Last reply Reply Quote 0
          • A
            admin @lakshmi_73 last edited by

            HI @lakshmi_73 This has been noted we will update you once fixed.

            1 Reply Last reply Reply Quote 0
            • A
              admin @whemant last edited by

              HI @whemant This has been fixed.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post