Problems with the data file open

Hi, brainstorm team,
thank you so much for your consistent support and update in brainstorm! And hope you all stay safe and happy in this special time. :slight_smile:

I met some open files problems with several data files in the same protocol, and the message showed like below. I have tried to reload the protocol, update the brainstrom and even redo the analysis, but it did not help. I can find all this data in the HD folder of that protocol but it just cannot open with brainstorm. This issue seems only happend in several files. For example, within the same participant, some blocks and files can be opened but others can not.
Have you met the similar problems before? Thanks in advance!

All the best,
Qianru


** Error: Line 43: in_bst_data (line 43)
** Data file was not found:
** 001/@rawDB_001_som_LittleFDev1_raw_tsss_mc_notch_low/data_0raw_DB_001_som_LittleFDev1_raw_tsss_mc_notch_low.mat
** Please reload this protocol (right-click > reload).
**
** Call stack:
** >in_bst_data.m at 43
** >bst_memory.m>LoadDataFile at 584
** >bst_memory.m at 72
** >view_timeseries.m at 90
** >tree_callbacks.m at 250
** >bst_call.m at 28
** >panel_protocols.m>CreatePanel/protocolTreeClicked_Callback at 123

Does it change anything if you change your current folder in Matlab?

Please copy-paste the output of each of the following commands executed in the Matlab command window:

>> ProtocolInfo = bst_get('ProtocolInfo')

>> DataFile = '001/@rawDB_001_som_LittleFDev1_raw_tsss_mc_notch_low/data_0raw_DB_001_som_LittleFDev1_raw_tsss_mc_notch_low.mat';
>> DataFileFull = bst_fullfile(ProtocolInfo.STUDIES, DataFile)

>> file_exist(DataFile)

>> file_exist(DataFileFull)

>> pwd

>> exist(DataFileFull)

Hi, thanks for your kind reply!
I tried to change the current folder but seems doesn't help...

Attached please find the output for the script. Does it mean those files do not exist? But I can find those folders in the subfolder of that protocol.

Best,
Qianru

ProtocolInfo =

          Comment: 'somanew-source test - condep all preprocessing finished with new source and grand average for all t...'
          STUDIES: 'G:\somaticprotocalcopy\somanew-source test - condep all preprocessing finished with new source and ...'
         SUBJECTS: 'G:\somaticprotocalcopy\somanew-source test - condep all preprocessing finished with new source and ...'
           iStudy: 5
   UseDefaultAnat: 0
UseDefaultChannel: 0

DataFileFull =

G:\somaticprotocalcopy\somanew-source test - condep all preprocessing finished with new source and grand average for all the conditions29.10.19\data\001@rawDB_001_som_LittleFDev1_raw_tsss_mc_notch_low\data_0raw_DB_001_som_LittleFDev1_raw_tsss_mc_notch_low.mat

ans =

 0

ans =

 0

ans =

G:\brainstorm3

ans =

 2

The total file path is longer than 256 characters, which might not be supported correctly for your drive by some functions, like the "dir" function in Matlab.

  1. In Brainstorm: File > Delete protocol > Only detach from database
  2. With your file explorer, rename folder "somanew-source test - condep all preprocessing finished with new source and grand average for all the conditions29.10.19" into something much shorter, with nos spaces, eg. "somanew"
  3. Delete the file somanew/data/protocol.mat
  4. In Brainstorm: File > Load protocol > Load from folder, select "somanew"

It works now!
Thank you so much and have a nice weekend!

All the best,
Qianru