Corrupted XIIDM files
I have encountered some unexpected errors when trying to read some of the compressed XIIDM files (see full list below).
I also get an error when trying to decompress the original .xiidm.bz2 files (see error messages & stacktraces below)
Platform info:
- OS: RedHat EL 9
- Python: 3.12.11
- pypowsybl: 1.10.0
Error when trying to read one of the affected snapshots with pypowsybl:
>>> from pypowsybl import network as pn
>>> network = pn.load("./2021/01/01/recollement-auto-20210101-0500-enrichi.xiidm.bz2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".venv/lib/python3.12/site-packages/pypowsybl/network/impl/network_creation_util.py", line 221, in load
return Network(_pp.load_network(file,
^^^^^^^^^^^^^^^^^^^^^^
pypowsybl._pypowsybl.PyPowsyblError: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[330196,10]
Message: Unexpected end of stream
Error when trying to decompress the file:
$ bzip2 -dk recollement-auto-20210101-0500-enrichi.xiidm.bz2
bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: No such file or directory
Input file = recollement-auto-20210101-0500-enrichi.xiidm.bz2, output file = recollement-auto-20210101-0500-enrichi.xiidm
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.
You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.
bzip2: Deleting output file recollement-auto-20210101-0500-enrichi.xiidm, if it exists.
List of presumably corrupted files:
./2021/01/01/recollement-auto-20210101-0500-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0510-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0515-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0525-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0530-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0535-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0545-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0550-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0555-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0600-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0605-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0610-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0615-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0620-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0625-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0630-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0635-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0645-enrichi.xiidm.bz2
./2021/01/01/recollement-auto-20210101-0655-enrichi.xiidm.bz2
Hello Mathieu,
Thank you so much for your quick feedback. We can confirm the same issue on the local server where the real data is stored. We'll regenerate this part of the dataset, verify it, and share it here shortly.
Best regards,
-- B.
It should be corrected now. Can you please confirm?
Hi, thank you for updating the cases!
I just updated my dataset (with git pull).
All the above files now parse correctly, except for the 05:55 snapshot, for which I get similar issues as before (see error messages below)
>>> network = pn.load("D-GITT-RTE7000-2021/2021/01/01/recollement-auto-20210101-0555-enrichi.xiidm.bz2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".venv/lib/python3.12/site-packages/pypowsybl/network/impl/network_creation_util.py", line 221, in load
return Network(_pp.load_network(file,
^^^^^^^^^^^^^^^^^^^^^^
pypowsybl._pypowsybl.PyPowsyblError: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[46988,165]
Message: Unexpected end of stream
$ bzip2 -dk D-GITT-RTE7000-2021/2021/01/01/recollement-auto-20210101-0555-enrichi.xiidm.bz2
bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: No such file or directory
Input file = D-GITT-RTE7000-2021/2021/01/01/recollement-auto-20210101-0555-enrichi.xiidm.bz2, output file = D-GITT-RTE7000-2021/2021/01/01/recollement-auto-20210101-0555-enrichi.xiidm
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.
You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.
bzip2: Deleting output file D-GITT-RTE7000-2021/2021/01/01/recollement-auto-20210101-0555-enrichi.xiidm, if it exists.