materialsproject / api

New API client for the Materials Project
https://materialsproject.github.io/api/
Other
105 stars 33 forks source link

[Bug]: Get ion reference data is broken #917

Open shyuep opened 1 week ago

shyuep commented 1 week ago

Code snippet

refer to matgenb.

What happened?

See below. Pls fix and add tests. No one can create a Pourbaix diagram at the moment.

Version

latest

Which OS?

Log output

File ~/micromamba/envs/venv/lib/python3.11/site-packages/mp_api/client/mprester.py:948, in MPRester.get_ion_reference_data(self)
    919 @lru_cache
    920 def get_ion_reference_data(self) -> list[dict]:
    921     """Download aqueous ion reference data used in the construction of Pourbaix diagrams.
    922 
    923     Use this method to examine the ion reference data and to add additional
   (...)
    946             compounds and aqueous species, Wiley, New York (1978)'}}
    947     """
--> 948     return self.contribs.query_contributions(  # type: ignore
    949         query={"project": "ion_ref_data"},
    950         fields=["identifier", "formula", "data"],
    951         paginate=True,
    952     ).get(
    953         "data"
    954     )
munrojm commented 6 days ago

Could you share the specific version of mp-api and mpcontribs-client you have installed? I'm having trouble recreating the issue.