Skip to content
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

When creating an empty network, the sourceFormat attribute is empty whereas its use is required #874

Open
gaouizer opened this issue Oct 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@gaouizer
Copy link

Describe the current behavior

when creating a network via the network.create_empty() function, the created network has an empty sourceFormat attribute and it does not seem that a setter is available. Thus, when dumping the corresponding network to an iidm xml file with network.save(), the sourceFormat attribute of the network tag is empty whereas the use of this attribute is required in iidm format. The resulting iidm file is not usable as such with some other powsybl tools such as iidm4cpp which raises an error in that case.

Describe the expected behavior

a non empty value shall be given to this attribute (either a default or via a setter)

Describe the steps

import pypowsybl as pp
network = pp.network.create_empty()
network.save('test.iidm')

Environment

No response

Relevant Log Output

No response

Extra Information

No response

@gaouizer gaouizer added the bug Something isn't working label Oct 23, 2024
@gaouizer gaouizer changed the title When creating and empty network, the sourceFormat attribute is empty whereas its use is required When creating an empty network, the sourceFormat attribute is empty whereas its use is required Oct 23, 2024
@jeandemanged
Copy link
Member

well spotted, issue here:

factory("empty", id -> Network.create(id, "")),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants