api icon indicating copy to clipboard operation
api copied to clipboard

[Bug]: Get ion reference data is broken

Open shyuep opened this issue 1 year ago • 1 comments

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?

  • [ ] MacOS
  • [ ] Windows
  • [ ] Linux

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     )

shyuep avatar Jun 29 '24 14:06 shyuep

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

munrojm avatar Jul 01 '24 20:07 munrojm

MPRester throws a warning that mpcontribs-client needs to be installed to use mpr.get_ion_reference_data() and construct Pourbaix diagrams. This was already in place in July as far as I can tell.

tschaume avatar Dec 13 '24 22:12 tschaume