Skip to content
This repository has been archived by the owner on Jul 7, 2019. It is now read-only.

ImportError: cannot import name PMGJSONEncoder #7

Open
matk86 opened this issue Sep 16, 2014 · 4 comments
Open

ImportError: cannot import name PMGJSONEncoder #7

matk86 opened this issue Sep 16, 2014 · 4 comments

Comments

@matk86
Copy link
Contributor

matk86 commented Sep 16, 2014

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.

@xhqu1981
Copy link
Contributor

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
#7.

@matk86
Copy link
Contributor Author

matk86 commented Sep 16, 2014

i think in multiple places PMGJSONEncoder class is being tried to import through, for example:
mpworks/drones/mp_vaspdrone.py", line 19, in
from pymatgen import Composition, PMGJSONEncoder
ImportError: cannot import name PMGJSONEncoder

@matk86
Copy link
Contributor Author

matk86 commented Sep 16, 2014

also i was trying to run the example scripts

@computron
Copy link
Member

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants