eelbrain.load.unpickle

eelbrain.load.unpickle(path=None)

Load pickled Python objects from a file.

Parameters:

path (Path | str) – Path to a pickle file. If omitted, a system file dialog is shown. If the user cancels the file dialog, a RuntimeError is raised.

Notes

If you see ValueError: unsupported pickle protocol, the pickle file was saved with a higher version of Python; in order to make pickles backwards-compatible, use pickle() with a lower protocol=2. To batch-convert multiple pickle files, use convert_pickle_protocol()

This function is similar to pickle.load(open(path)), but also loads object saved with older versions of Eelbrain, and allows using a system file dialog to select a file.

See also

load.unpickle, load.convert_pickle_protocol