Skip to content

Unable to login. Exception: Please configure your keys in keys.conf #50

Description

@kumarchinmaya116
  • 5paisa Python SDK version:
  • Python version:
  • Operating System:

Description

The first time I tried to login, it showed a logged in!! message. But thereafter, I am not able to login. every time i run the script, I get the error: Exception: Please configure your keys in keys.conf.
I have saved my keys in keys.conf file as per the instruction and saved the file in the directory where i have kept the script. Still it shows the same error.

What I Did

from py5paisa import FivePaisaClient
client = FivePaisaClient(email="k*****************6@gmail.com", passwd="***********", dob="********")
client.login()
( in place of * i have used my credentials)

The output:
Traceback (most recent call last):

  File "C:\Users\dhriti\Anaconda3\envs\trading\lib\site-packages\py5paisa\conf.py", line 9, in <module>
    section = config["KEYS"]

  File "C:\Users\dhriti\Anaconda3\envs\trading\lib\configparser.py", line 958, in __getitem__
    raise KeyError(key)

KeyError: 'KEYS'


During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "<ipython-input-1-7999cee77a8c>", line 1, in <module>
    from py5paisa import FivePaisaClient

  File "C:\Users\dhriti\Anaconda3\envs\trading\lib\site-packages\py5paisa\__init__.py", line 1, in <module>
    from py5paisa.py5paisa import FivePaisaClient

  File "C:\Users\dhriti\Anaconda3\envs\trading\lib\site-packages\py5paisa\py5paisa.py", line 2, in <module>
    from .auth import EncryptionClient

  File "C:\Users\dhriti\Anaconda3\envs\trading\lib\site-packages\py5paisa\auth.py", line 8, in <module>
    from .conf import ENCRYPTION_KEY

  File "C:\Users\dhriti\Anaconda3\envs\trading\lib\site-packages\py5paisa\conf.py", line 11, in <module>
    raise Exception("Please configure your keys in keys.conf")

Exception: Please configure your keys in keys.conf

Has anyone faced similar issue? If so, what can be done?

Regards
Chinmaya

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions