Skip to content

Token is read from file in __init__() before it is written to the file #28

@denis-postanogov

Description

@denis-postanogov

Trying this code:

from pysendpulse.pysendpulse import PySendPulse

REST_API_ID = "..."
REST_API_SECRET = "..."
SPApiProxy = PySendPulse(REST_API_ID, REST_API_SECRET)

I get the following exception:
ERROR [2022-06-12 16:30:31,685] Can't find file '..........................' to read security token.

This is because in init() the token is read from the file before it is saved to the file by __get_token() function. I do not understand the expected flow. Shall I create the file myself before calling the constructor? Then why the filename is md5-encoded then?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions