Closed AlexHeustc closed 1 month ago
Dear developers, I have met the same problem. Please check it.
Same issue here.
I have another question is that there are quite some packages depending on this package (e.g., matbench), and they keep throwing out this exception. So I guess these packages shouldn't work until this issue is fixed?
I encountered the same problem. It's actually not a bug of matminer. matminer depends on pymatgen. The latest version of matminer is 0.8.0 which was published on Nov 11, 2022, while pip always installs the latest version of dependences, i.e., pymatgen==2023.3.23 for me. On the other hand, pymatgen depends on mp-api. Sadly, the constraints that pymatgen imposes on mp-api is >=0.27.3, which leads pip to install the latest version of mp-api, i.e., 0.31.0, released on Apr 6, 2023. It's not clear from which version mp-api changed its api that it no longer supports MPRester().query. Therefore, when we called MPDataRetrieval().get_dataframe() as guided by matminer, we got a NotImplementedError.
Is there any solution
I encountered the same problem. It's actually not a bug of matminer. matminer depends on pymatgen. The latest version of matminer is 0.8.0 which was published on Nov 11, 2022, while pip always installs the latest version of dependences, i.e., pymatgen==2023.3.23 for me. On the other hand, pymatgen depends on mp-api. Sadly, the constraints that pymatgen imposes on mp-api is >=0.27.3, which leads pip to install the latest version of mp-api, i.e., 0.31.0, released on Apr 6, 2023. It's not clear from which version mp-api changed its api that it no longer supports MPRester().query. Therefore, when we called MPDataRetrieval().get_dataframe() as guided by matminer, we got a NotImplementedError.
Is there any solution to fix it?
Is there any solution
I encountered the same problem. It's actually not a bug of matminer. matminer depends on pymatgen. The latest version of matminer is 0.8.0 which was published on Nov 11, 2022, while pip always installs the latest version of dependences, i.e., pymatgen==2023.3.23 for me. On the other hand, pymatgen depends on mp-api. Sadly, the constraints that pymatgen imposes on mp-api is >=0.27.3, which leads pip to install the latest version of mp-api, i.e., 0.31.0, released on Apr 6, 2023. It's not clear from which version mp-api changed its api that it no longer supports MPRester().query. Therefore, when we called MPDataRetrieval().get_dataframe() as guided by matminer, we got a NotImplementedError.
Is there any solution to fix it?
Hope someone check the py code...
Please see the pinned issue: https://github.com/hackingmaterials/matminer/issues/913
As far as I know, no-one has started working on this and it is probably not a high priority, since the matminer code is simply a wrapper to pymatgen. If you can use the structures downlodaed via pymatgen directly in matminer as per normal. I would happily review a PR if anyone wanted to add support for the new MP API!
In fact I will close this and direct you to #913 to continue the discussion.
Hi , I wanted to get data from Materials Project, so my code is like that:
from matminer.data_retrieval.retrieve_MP import MPDataRetrieval \n df_mp = mpdr.get_dataframe(criteria='LiC12', properties=['band_gap'])
but I got the traceback The MPRester().query method has been replaced with the MPRester().summary.search method.Note this method also no longer supports direct MongoDB-type queries. For more information,please see the new documentation. It seems like thatdata = self.mprester.query(criteria, properties, mp_decode=mp_decode)
in the file retrieve_MP.py need to be changed toself.mprester.summary.search
?