File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1+ Improved error message in :meth: `mne.io.Raw.save ` when attempting to overwrite a file, by :newcontrib: `Sebastian Jentschke `
Original file line number Diff line number Diff line change 272272.. _Scott Huberty : https ://orcid . org /0000-0003-2637-031 X
273273.. _Sebastiaan Mathot : https ://www . cogsci . nl /smathot
274274.. _Sebastian Castano : https ://github . com /jscastanoc
275+ .. _Sebastian Jentschke : https ://github . com /sjentsch
275276.. _Sebastian Major : https ://github . com /major -s
276277.. _Sena Er : https ://github . com /sena -neuro
277278.. _Senwen Deng : https ://snwn . de
Original file line number Diff line number Diff line change @@ -1792,9 +1792,10 @@ def save(
17921792
17931793 split_size = _get_split_size (split_size )
17941794 if not self .preload and fname in self .filenames :
1795+ extra = " and overwrite must be True" if not overwrite else ""
17951796 raise ValueError (
1796- "You cannot save data to the same file. Please use a different "
1797- "filename."
1797+ "In order to save data to the same file, data need to be preloaded "
1798+ + extra
17981799 )
17991800
18001801 if self .preload :
You can’t perform that action at this time.
0 commit comments