openPMD / openPMD-api

:floppy_disk: C++ & Python API for Scientific I/O
https://openpmd-api.readthedocs.io
GNU Lesser General Public License v3.0
142 stars 51 forks source link

HDF5: Delete and re-create attribute when overwriting with diff. type #1697

Open franzpoeschel opened 6 days ago

franzpoeschel commented 6 days ago

Seen in a file that was originally create with h5py and the opened in R/W-mode with openPMD-api. Since h5py and openPMD-api apparently use different vec-string types, this leads to corrupted files. Since we do support attributes with multiple possible types, the type of an existing attribute should be checked before reuse.

TODO: