[Eeglablist] issue with pop_saveset function

Joanna Morris jmorris at hampshire.edu
Sun Aug 1 17:29:57 PDT 2021


Hello,

I found the following post dated Feb 15 2021 which describes exactly the error message I  am getting:

"Error using floatwrite (line 91)Cannot write output file, check permission and space”

The response to that post was as follows : 

"Apparently, a file cannot be written on your system. 
This could be due to a variety of reasons:
- You are trying to write in the wrong folder and you do not have permission to do so (most likely)
- You are trying to overwrite a file that belongs to someone else and you do not have permission to do so
- Your hard drive is full”

However, this is not the case for me.  I can save the file to the requisite directory using the GUI and I can save the file to the requisite directly from the CLI using the command copied from EEG.history:

EEG = pop_saveset( EEG, 'filename','m15_s08_flt_ICA_rs.set','filepath','/Users/jmorris/OneDrive - Providence College/PC_HPLAB/PROJECTS/MORPH15/dat/erp/202108/‘);

However, I cannot get it to save from the following script:

fname = ‘m15_s08_flt_ICA_rs.set'
data_path = 'Users/jmorris/OneDrive - Providence College/PC_HPLAB/PROJECTS/MORPH15/dat/erp/202108/'
EEG = pop_saveset( EEG, 'filename', fname, 'filepath', data_path)

These should be equivalent but for some reason they are not.

The full error message that I get is :

Error using floatwrite (line 91)
Cannot write output file, check permission and space

Error in floatwrite (line 91)
        if fid == -1, error('Cannot write output file, check permission and space'); end

Error in pop_saveset (line 239)
            tmpdata = floatwrite( tmpdata, fullfile(EEG.filepath, EEG.filename), 'ieee-le');
 


Line 239 in the pop_saveset function is as follows:

tmpdata = floatwrite( tmpdata, fullfile(EEG.filepath, EEG.data), 'ieee-le’)


I am not a proficient MATLAB programmer but it seems like the ‘fullfile’ function should take a filepath and filename as arguments rather than the EEG.data?



Joanna Morris, PhD
Professor of Cognitive Science,
School of Cognitive Science,
Hampshire College
jmorris at hampshire.edu
(413) 559-5462










More information about the eeglablist mailing list