Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run demo_snirf.m on Windows 11 #8

Open
snowuyl opened this issue Aug 18, 2023 · 1 comment
Open

Failed to run demo_snirf.m on Windows 11 #8

snowuyl opened this issue Aug 18, 2023 · 1 comment

Comments

@snowuyl
Copy link

snowuyl commented Aug 18, 2023

setpaths
demo_snirf

Converting D:/workspace_MATLAB/snirf_homer3/Snirf/Examples/Simple_Probe.nirs to D:/workspace_MATLAB/snirf_homer3/Snirf/Examples/Simple_Probe.snirf
Saving D:/workspace_MATLAB/snirf_homer3/Snirf/Examples/Simple_Probe.snirf ...
Unrecognized function or variable 'ispathvalid'.

Error in StimClass/SaveHdf5 (line 156)
if ~ispathvalid(fileobj, 'file')

Error in SnirfClass/SaveStim (line 600)
obj.stim(ii).SaveHdf5(fileobj, [obj.location, '/stim', num2str(ii)]);

Error in SnirfClass/SaveHdf5 (line 654)
obj.SaveStim(fileobj);

Error in SnirfClass/Save (line 667)
obj.SaveHdf5(fileobj);

Error in snirf_load_save (line 39)
tic; snirf_saved.Save(outfile); toc

Error in demo_snirf (line 29)
[snirf_saved, snirf_loaded] = snirf_load_save([pname, '/', nirsfiles(ii).name]);

demo_snirf

Converting D:/workspace_MATLAB/snirf_homer3/Snirf/Examples/Simple_Probe.nirs to D:/workspace_MATLAB/snirf_homer3/Snirf/Examples/Simple_Probe.snirf
Saving D:/workspace_MATLAB/snirf_homer3/Snirf/Examples/Simple_Probe.snirf ...
Unrecognized function or variable 'ispathvalid'.

Error in StimClass/SaveHdf5 (line 156)

@BAK262
Copy link

BAK262 commented Mar 10, 2024

I met the same issue on MacBook Air (M1 version), macOS=Sonoma 14.1.1, matlab R2023a.

My solution is to modify the line 156 in StimClass.m as:
if ~isfile(fileobj)

It worked well, except for the error:
ERROR: Saved and loaded SnirfClass objects for video.snirf are NOT equal
but I think this is another independent issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants