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

[Dev/CI] Repo secret PMG_MAPI_KEY missing or set to legacy key? #62

Open
DanielYang59 opened this issue Dec 4, 2024 · 0 comments
Open

Comments

@DanielYang59
Copy link
Contributor

DanielYang59 commented Dec 4, 2024

Looks like the repo secret for the MP API Key PMG_MAPI_KEY is missing or set to the legacy one?

PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}

I'm getting the following error in #61 from CI (tests run just fine locally):

MPRestError: REST query returned with error status code 401 on URL https://api.materialsproject.org/materials/thermo/?thermo_types=GGA_GGA%2BU&_fields=entries%2Cthermo_type&chemsys=Ca&_limit=143 with message:
Response {
  "message":"No API key found in request"
}

@shyuep can you please give me a hand on this (I don't have access of course), thanks!


Update: I'm trying to figuring this out, as pymatgen seem to use the same env var PMG_MAPI_KEY for both legacy and new API key, which makes it really hard to test new and legacy MPRester at the same time, perhaps it's good for pmg to handle legacy and new keys separately?

Update2: As per the recommendation from @tschaume, I guess the best thing to do for matgenb is to set PMG_MAPI_KEY to the new key and skip tests for the legacy ones (and I will have a closer look if migrating the script to new API is possible)

@DanielYang59 DanielYang59 changed the title [Dev/CI] Repo secret PMG_MAPI_KEY missing? [Dev/CI] Repo secret PMG_MAPI_KEY missing or set to legacy key? Dec 7, 2024
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

1 participant