8.7.1.6. pymodaq_data.h5modules.migration module
Migration of the h5 files written by older versions of PyMoDAQ
Older versions stored the strings of the string nodes (such as the logger) as pickles. They are still read, but the migration rewrites them as plain UTF-8, as the current version does, in a copy of the file.
- pymodaq_data.h5modules.migration.migrate_h5_file(source, destination=None)[source]
Write a copy of a h5 file in which the pickled strings are rewritten as UTF-8
The source file is never modified, and an existing destination file is never overwritten.
- Parameters:
- Return type:
- Returns:
Path (
the migrated file)int (
the numberofstring nodes that were migrated)
- Raises:
FileExistsError – if the destination exists
UnsafePickleError – if a string node contains anything else than a string, in this case nothing is written