-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: The .as_dict()
method on CrystalSystem
is not Monty compatible
#914
Comments
.as_dict()
method on CrystalSystem
is not Monty compatable.as_dict()
method on CrystalSystem
is not Monty compatible
Looks like I ran into something similar, resolved on monty's side: |
Oh that was smart! Thanks!! I'll check if is resolved with the monty update. |
Looks like your PR didn't fix this one btw, @jmmshn. I'll have to dig into it later. |
So I think the custom So something like this should work. from monty.serialization import dumpfn
from enum import Enum
class Test(Enum):
a = "a"
b = "b"
t = Test.a
dumpfn(t, "test.json") So I think if we just remove the custom |
Thanks for the pointer, @jmmshn! Removing the AttributeError: 'CrystalSystem' object has no attribute 'as_dict' I'll dig into this later in the week. I think I know where to look now. 👍 |
Problem
This returns the string "Triclinic" rather than a dictionary. This would normally be fine, but the fact that it's a string means that doing
dumpfn
doesn't work on a data structure containing aCrystalSystem
object.Traceback:
Proposed Solution
Modify the
.as_dict()
method?Alternatives
No response
The text was updated successfully, but these errors were encountered: