Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Importing Synoptic API token #57

Open
charliephillips4201 opened this issue Jul 30, 2024 · 1 comment
Open

Issue Importing Synoptic API token #57

charliephillips4201 opened this issue Jul 30, 2024 · 1 comment

Comments

@charliephillips4201
Copy link

charliephillips4201 commented Jul 30, 2024

Hi Brian,

First time trying out SynopticPy - thank you for creating this tool! I've installed via conda, and when I do the first step here (https://synopticpy.readthedocs.io/en/latest/user_guide/setup.html) of typing "import synoptic.services" and enter my API token, I get the following error. I've tried this with multiple Synoptic API tokens.

What is your Synoptic API token? >>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxd47a

Thanks! I will do a quick test...
🧪 Testing your token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxd47a
Traceback (most recent call last):

  Cell In[5], line 1
    import synoptic.services

  File ~\AppData\Local\miniconda3\Lib\site-packages\synoptic\services.py:95
    from synoptic.get_token import config

  File ~\AppData\Local\miniconda3\Lib\site-packages\synoptic\get_token.py:217
    config = test_token(verbose=False)

  File ~\AppData\Local\miniconda3\Lib\site-packages\synoptic\get_token.py:142 in test_token
    return config_token()

  File ~\AppData\Local\miniconda3\Lib\site-packages\synoptic\get_token.py:209 in config_token
    config = test_token(configure_on_fail=False)

  File ~\AppData\Local\miniconda3\Lib\site-packages\synoptic\get_token.py:151 in test_token
    response = json["SUMMARY"]["RESPONSE_MESSAGE"]

KeyError: 'SUMMARY'

I've tried deleting the config file and uninstalling/reinstalling synopticpy and get the same error. I am running Python 3.12.3

Thank you for any assistance you can provide.

@blaylockbk
Copy link
Owner

Thanks for reporting this. I'll have to look into it. I wonder if the returned json has changed??? It seems like the "SUMMARY" key isn't there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants