MPWorks
MPWorks copied to clipboard
ImportError: cannot import name PMGJSONEncoder
I was able run the example job in the mpworks folder with previous versions. But the recent version is giving me the above mentioned error? It seems like the class PMGJSONEncoder is missing in the newer versions. In the old versions it used be in the pymatgen/serailizers folder.
Hi Kiran,
Please use monty.json.MontyDecoder instead.
Best regards,
Xiaohui
On Mon, Sep 15, 2014 at 6:05 PM, Kiran Mathew [email protected] wrote:
I was able run the example job in the mpworks folder with previous versions. But the recent version is giving me the above mentioned error? It seems like the class PMGJSONEncoder is missing in the newer versions. In the old versions it used be in the pymatgen/serailizers folder.
— Reply to this email directly or view it on GitHub https://github.com/materialsproject/MPWorks/issues/7.
i think in multiple places PMGJSONEncoder class is being tried to import through, for example:
mpworks/drones/mp_vaspdrone.py", line 19, in
also i was trying to run the example scripts
Hi Kiran
There have been several recent updates to pymatgen that are incompatible with the current version of MPWorks. I will be updating MPWorks sometime soon to account for these changes (although I am on travel the next few days). If you need a solution more quickly you can either downgrade your pymatgen version or you can fork MPWorks and replace the imports (in that case, it would be nice if you can contribute back the changes by submitting a pull request)