-
Notifications
You must be signed in to change notification settings - Fork 134
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
KeyError in EnergySystem.flows() after dump/restore #742
Comments
What do you use for dumping and restoring? |
energysystem.dump() and energysystem.restore(), like in the basic example. |
Scheint als würden die outputs nicht korrekt restored, da folgende Zeile den Fehler wirft: Denke, dass hat nichts mit der Funktion |
You are right, the KeyError is in the flows() method. So, it is actually a bug in the EnergySystem class of oemof.network. Does it make sense to open an issue there? |
sorry for en/de mixup... |
Hi there, I think I also stumbled upon this problem: oemof/oemof-network#10 (comment) |
This answers your question @jnnr - we can simply close this issue... Duplicate of oemof/oemof-network#10 |
Ok, if you say so. I just updated the title. But it is the same problem. |
Maybe you could ask if there is any progress? |
According to
is False Apparently the dict used for oemof outputs inherits from Sorry I don't have time to look into it further right now, I hope this might help to lead to finding the bug :) |
Thanks for your feedback. That's right, the |
Describe the bug
There is a KeyError in EnergySystem's flows method when called on a EnergySystem that has been dumped and restored: https://github.com/oemof/oemof.network/blob/96648132045837e58b008f114eae88ed66154007/src/oemof/network/energy_system.py#L176-L181
I found it when using
oemof.solph.processing.parameter_as_dict
. Getting the parameters of an EnergySystem is a useful step, e.g. in postprocessing.The respective dictionary (see log below) contains a Bus with the proper name, but does not seem to totally fit. Maybe the EnergySystem is in an inconsistent state after deserialization? Any ideas @oemof-developer, @oemof/oemof-solph?
To Reproduce
Steps to reproduce the behavior:
energysystem.flows()
Expected behavior
The method should work after restoring. In particular, it should be possible to use parameter_as_dict after restoring.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: