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 272
272
.. _Scott Huberty : https ://orcid . org /0000-0003-2637-031 X
273
273
.. _Sebastiaan Mathot : https ://www . cogsci . nl /smathot
274
274
.. _Sebastian Castano : https ://github . com /jscastanoc
275
+ .. _Sebastian Jentschke : https ://github . com /sjentsch
275
276
.. _Sebastian Major : https ://github . com /major -s
276
277
.. _Sena Er : https ://github . com /sena -neuro
277
278
.. _Senwen Deng : https ://snwn . de
Original file line number Diff line number Diff line change @@ -1792,9 +1792,10 @@ def save(
1792
1792
1793
1793
split_size = _get_split_size (split_size )
1794
1794
if not self .preload and fname in self .filenames :
1795
+ extra = " and overwrite must be True" if not overwrite else ""
1795
1796
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
1798
1799
)
1799
1800
1800
1801
if self .preload :
You can’t perform that action at this time.
0 commit comments