-
Notifications
You must be signed in to change notification settings - Fork 53
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
[WIP] Make MigrationHop MSONable again #264
Conversation
Please add test @jmmshn thank you!
So it looks like we are hitting a custom as_dict + from_dict So when the decoding tries to process the |
From looking at it, it's not even clear to me that that custom as_dict() is necessary at all. |
That said, why is this an issue upstream? |
OK so sit down for this one... So right now I think when This is all because this line We gotta have some kind of auto test generation for these things... |
Still confused based on this description, why would it try to run as_dict
on a dictionary?
…On Fri, Oct 15, 2021 at 17:30, JSX ***@***.***> wrote:
OK so sit down for this one...
So right now I think when MigrationHop.from_dict getting called, and the
parser hits the symm_structure it goes into the structure field of
SymmetrizedStructure which then sees the
***@***.***': 'SymmetrizedStructure' part of the dictionary and tries to run
the SymmetrizedStructure.as_dict on the structure field of serialized
dictionary.
[image: image]
<https://user-images.githubusercontent.com/14003693/137566601-096c2a08-5465-437a-ae48-65a3057d2e53.png>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#264 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAWWWRBIU2YWLMMAQOYTSJDUHDBSJANCNFSM5GAQ5Z6Q>
.
|
So the problem right now is
The decoding errors out even though it's just a dictionary because when it gets to That's because this line is absolutely not OK. |
This should be fixed in the pymatgen SymmetrizedStructure side, not in the diffusion package. |
If someone else would like to take over this PR, please do, I think it only needs a test to be able to merge; if I recall I opened this during a debugging session, but I'm not involved in pymatgen-analysis-diffusion so would prefer someone else who is actively using it takes it on. |
I can take over writing a test for this but was confused by the follow-up discussion. Is there still an issue with encoding |
This issues has been resolved in a new PR that was successfully merged: #312 |
Fantastic, thanks @acrutt! |
Thanks, @acrutt I'm on leave for the rest of this month so have been slow with emails. |
So I think the underlying bug was still not fixed in pymatgen. |
@acrutt if you tried to serialize->deserialize with |
I'm not familiar with that part of the issue. When I create a MigrationHop with the |
So the bug only triggers a problem if you read from a db or read via If you see a |
Please add test @jmmshn thank you!