appSession.generate_token() error

Hi,

Getting below error while trying to generate token, pls. help.

# Generate the token
response = appSession.generate_token()
print(response)

File “C:\Program Files\Python311\Lib\json\decoder.py”, line 337, in decode

obj, end = self.raw_decode(s, idx=_w(s, 0).end())

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “C:\Program Files\Python311\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:

Traceback (most recent call last):

File “C:\PycharmProjects\Project_1\Config.py”, line 48, in

response = appSession.generate_token()

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “C:\Users\CRNT_USER\AppData\Roaming\Python\Python311\site-packages\fyers_apiv3\fyersModel.py”, line 342, in generate_token

return response.json()

       ^^^^^^^^^^^^^^^

File “C:\Users\CRNT_USER\AppData\Roaming\Python\Python311\site-packages\requests\models.py”, line 975, in json

raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Hey @LYddsM1o69

There was an issue with the access token which is fixed now , please check and revert if the issue persists