You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which demo exhibits the problem (if applicable): N/A
How you installed Caiman (pure conda, conda + compile, colab, ..): conda + compile
Details:
I encountered the "No file saved" warning when trying to do motion correction on just an ndarray (for a test). There is code to save an ndarray or movie to a temporary .hdf5 file first, but it doesn't set the file_name attribute on the movie if it's not already a movie that has one. As a result, saving file_name fails:
...because file_name is [None] and (None).encode('utf8') doesn't work. In practice, I realized since it's just a warning the code will continue and work as expected, but may as well fix it to avoid any doubt.
Suggested fix: change to dset.attrs["file_name"] = [a.encode('utf8') for a in self.file_name if a is not None]
Optional additional fix: in motion_correction.py line 177, set file_name when creating the movie: caiman.movie(fname, file_name=mc_tempfile).save(mc_tempfile) (however this will not overwrite file_name if fname is already a movie)
The text was updated successfully, but these errors were encountered:
Longer term we'll probably not want to base filenames on each other as we improve pathing logic and keep runs isolated from each other while saving metadata elsewhere (likely instead just using a static filename), but this seems like a good solution in the middle term.
Your setup:
I encountered the "No file saved" warning when trying to do motion correction on just an ndarray (for a test). There is code to save an ndarray or movie to a temporary .hdf5 file first, but it doesn't set the
file_name
attribute on the movie if it's not already a movie that has one. As a result, savingfile_name
fails:CaImAn/caiman/base/timeseries.py
Lines 297 to 300 in bb55800
...because
file_name
is[None]
and(None).encode('utf8')
doesn't work. In practice, I realized since it's just a warning the code will continue and work as expected, but may as well fix it to avoid any doubt.Suggested fix: change to
dset.attrs["file_name"] = [a.encode('utf8') for a in self.file_name if a is not None]
Optional additional fix: in motion_correction.py line 177, set file_name when creating the movie:
caiman.movie(fname, file_name=mc_tempfile).save(mc_tempfile)
(however this will not overwritefile_name
iffname
is already a movie)The text was updated successfully, but these errors were encountered: