attribute error for access token

AttributeError: 'KiteConnect' object has no attribute 'request_access_token
this message is popping up every time when i request access token ...pls someone help me with this
  • sujith
    Where did you see this method?
  • a4arjun
    on profit adda youtube channel
  • sujith
    It is a very old version of Kite Connect. The new one has generate_session method.
    You can check out pykiteconnect documentation here for more information.
  • a4arjun
    with generate_session method is showing as below

    File "", line 1, in
    data = kite.generate_session("Kpq6mZ6oUZvNjUgllOlRKV4VYRnNyfGn", api_secret)

    File "C:\Users\Arjun\Anaconda3\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\", line 232, in generate_session
    "checksum": checksum

    File "C:\Users\Arjun\Anaconda3\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\", line 701, in _post
    return self._request(route, "POST", params)

    File "C:\Users\Arjun\Anaconda3\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\", line 766, in _request
    raise exp(data["message"], code=r.status_code)

    TokenException: Token is invalid or has expired.
  • sujith
    You can take a look at this thread.
  • a4arjun
    thanks friend for ur advice ...but now when i am going throuh generate session method is showing this

    DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1):
    DEBUG:urllib3.connectionpool: "POST /session/token HTTP/1.1" 200 None
  • sujith
    Can you please let us know the fix here? I think you had resolved a similar issue recently.
Sign In or Register to comment.