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

pypowsybl has issue in binary data parsing library #830

Open
AnkurArohi opened this issue Sep 17, 2024 · 0 comments
Open

pypowsybl has issue in binary data parsing library #830

AnkurArohi opened this issue Sep 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@AnkurArohi
Copy link

Describe the current behavior

PyPowsyblError: This specific error indicates a problem with binary data parsing in the pypowsybl library. The library is unable to parse the binary data correctly, leading to the PyPowsyblError.

copy.deepcopy(net)
*** pypowsybl._pypowsybl.PyPowsyblError: No enum constant com.powsybl.cgmes.extensions.Source.

Describe the expected behavior

Like in the previous versions while deepcopying the binary data parsing should not end up in error

Describe the steps

          net_c = copy.deepcopy(net())

../../../copy.py:172: in deepcopy
y = _reconstruct(x, memo, *rv)
../../../copy.py:273: in _reconstruct
y.setstate(state)


self = <[AttributeError("'Network' object has no attribute '_id'") raised in repr()] Network object at 0x7fbabcb00ad0>, state = {'biidm': <_io.BytesIO object at 0x7fbabcb53970>, 'nominal_apparent_power': 100.0, 'per_unit': False}
def setstate(self, state: Dict[str, Any]) -> None:

  self._handle = _pp.load_network_from_binary_buffers([state['biidm'].getbuffer()], {}, None)

E pypowsybl._pypowsybl.PyPowsyblError: Binary parsing: expected end node but got 25701
../.././network.py:130: PyPowsyblError

Environment

pypowsybl 1.6.1
Linux

Relevant Log Output

No response

Extra Information

No response

@AnkurArohi AnkurArohi added the bug Something isn't working label Sep 17, 2024
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

1 participant