-
Notifications
You must be signed in to change notification settings - Fork 4
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
Dump and restore not working properly / strange KeyError #10
Comments
I don't know how to solve this issue, but @jnnr seemed to have similar intentions while discovering this bug: analysis of the oemof results. In the end I worked my way around this problem and wrote some functions which work for me. Maybe they are useful for others: https://gist.github.com/sschlueters/4af0f5f035ea3f38f6050e818aba776c Edit: The functions expect the results as given by |
I could fix the KeyError by replacing
with
in the flows() method, which is said to be a usual solution in case of KeyErrors. Still not 100% sure why this works. |
Ok, that was trivial - too quick. .get returns None if the key is not found, so this is not really a fix. |
The funny thing is that the key seems to be present. I checked and found that the hash is correct. |
I made some further observations in oemof/oemof-solph#742 (comment), but I am stuck again. Any ideas, @oemof/oemof-core? |
I found a related issue. I think it's because Nodes have a hash function that is depending on the label. The label, however, seems always set (in time) when restoring a model. |
I stumbled upon a strange error. The
EnergySystem.flows
method doesn't work, when the energy system was dumped and restored. Here is a minimal example:I get as an output:
Even
fails after dumping and restoring the energy system.
The text was updated successfully, but these errors were encountered: