Closed IndrajeetPatil closed 8 years ago
Sorry for just seeing this now. The error appears to trace back to spm.m and I haven't seen this before so not sure what the problem is. Any chance you've already figured it out? If not, next steps could be getting write permissions on the toolbox directory so that the error handling function can save a few files to disk that contain information about the state of the program when things erred. And/or you could send me the analysis you were trying to look at and I can see if I can reproduce the error.
I had this same error. Bob is correct, you need permissions to write to the directory where bspmview is located. The easiest solution is to run Matlab as administrator and the error goes away.
Ah, good to know! I will try this out. Thanks!
On Thu, May 19, 2016 at 7:54 PM, jttrs notifications@github.com wrote:
I had this same error. Bob is correct, you need permissions to write to the directory where bspmview is located. The easiest solution is to run Matlab as administrator and the error goes away.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/spunt/bspmview/issues/3#issuecomment-220402469
And, actually, I think I will just get rid of this auto-saving feature and just prompt the user with the option if and where to save these error files.
Hi, I have a similar error when I try to load anything on bspmview:
Error using save Unable to write file /software/system/spm/spm-12-20160310/toolbox/bspmview/supportfiles/defpref.mat: No such file or directory.
Error in bspmview>default_preferences (line 180) if initial, save(deffile, '-struct', 'def'); return; end
Error in bspmview>put_figure (line 441) default_preferences(1);
Error in bspmview (line 139) S = put_figure(ol, ul); she;
Error in spm (line 1009) evalin('base',xTB(i).prog);
Error while evaluating UIControl Callback
However I'm working on a multi-user system so it's not possible for me to log in as an administrator or have permission to write to this directory. Is there any way around this so that I can still use the toolbox, or select another directory to save my files to?
Thanks
Dear Bob,
I am also getting a similar error again. :(
Error using save
Unable to write file C:\Program Files (x86)\R2013a\spm12\toolbox\bspmview\supportfiles\defpref.mat: permission denied. Error in bspmview>default_preferences (line 180) if initial, save(deffile, '-struct', 'def'); return; end Error in bspmview>put_figure (line 441) default_preferences(1); Error in bspmview (line 139) S = put_figure(ol, ul); shg; Error in spm (line 1009) evalin('base',xTB(i).prog);
Error while evaluating uicontrol Callback
I am also attaching here the saved error files if they can be of any help. I am using the most recent version of bspmview (downloaded from github yesterday).
Thanks for the help.
Indra
On Mon, Jul 25, 2016 at 2:44 PM, annapm-kcl notifications@github.com wrote:
Hi, I have a similar error when I try to load anything on bspmview:
Error using save Unable to write file
/software/system/spm/spm-12-20160310/toolbox/bspmview/supportfiles/defpref.mat: No such file or directory.
Error in bspmview>default_preferences (line 180) if initial, save(deffile, '-struct', 'def'); return; end
Error in bspmview>put_figure (line 441) default_preferences(1);
Error in bspmview (line 139) S = put_figure(ol, ul); she;
Error in spm (line 1009) evalin('base',xTB(i).prog);
Error while evaluating UIControl Callback
However I'm working on a multi-user system so it's not possible for me to log in as an administrator or have permission to write to this directory. Is there any way around this so that I can still use the toolbox, or select another directory to save my files to?
Thanks
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spunt/bspmview/issues/3#issuecomment-234942647, or mute the thread https://github.com/notifications/unsubscribe-auth/AKzjlYfGCufqZWBzw8dRAtuPAsgohvdGks5qZK_AgaJpZM4IRS2c .
Error using save Unable to write file C:\Program Files (x86)\R2013a\spm12\toolbox\bspmview\supportfiles\defpref.mat: permission denied.
Error in bspmview>default_preferences (line 180) if initial, save(deffile, '-struct', 'def'); return; end
Error in bspmview>put_figure (line 441) default_preferences(1);
Hi Indra - Thanks for the heads up about this. I believe this is an issue with not having write permission on the supportfiles
subdirectory where the file defpref.mat
(which stores user preferences across sessions) is saved. I just pushed an update to the software that I hope will overcome this by instead writing the user preference file to the users home directory. To make this file recognizable I renamed it bspmview_preferences.mat
. Let me know if this doesn't solve your problem.
Cheers, Bob
Hi Bob!
It works marvelously well now! Thank you so much. :) :)
On Tue, Aug 2, 2016 at 6:01 AM, Bob Spunt notifications@github.com wrote:
Reopened #3 https://github.com/spunt/bspmview/issues/3.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spunt/bspmview/issues/3#event-741868939, or mute the thread https://github.com/notifications/unsubscribe-auth/AKzjlYt67u5Bl2Z0O1HU6A5qPTDW0tdJks5qbsEDgaJpZM4IRS2c .
Phew... that's a relief to hear! Thanks for letting me know.
Hey there,
I get this error on my Win7 x64 Pro machine:
??? Error using ==> save
Unable to write file bspmview_preferences.mat: permission denied.
Error in ==> bspmview>default_preferences at 180
if initial, save(deffile, '-struct', 'def'); return; end
Error in ==> bspmview>put_figure at 441
default_preferences(1);
Error in ==> bspmview at 139
S = put_figure(ol, ul); shg;
This happens with v.20160803 and didn't with a previous version (but I can't remember what version it was exactly, the one from july I think).
/EDIT: I modified the permissions of course but it didn't fix the issue.
Let me look into it. Since I don't have a ton of time at the moment what I may do is add an error catch that will revert to using the default (hard-coded) preferences whenever there's an unrecognized error with writing preferences to disk.
Just pushed an update (20160919) that should in the least make the software work when encountering issues writing preferences to disk. Let me know if it doesn't, thanks!
Hey Bob,
Thank you for the very responsive reply.
In fact it's my bad, indeed, the folder supportfiles was given the wrong permissions and I do not know why since it worked before and nothing has changed. In fact it seems the permissions got corrupted by some process because I could not even change the owner nor delete the folder using normal means, so I had to delete it on startup and then recreate it.
Now it works perfectly well. Damn permission issues on Windows, this OS can't properly manage permissions.
2016-09-19 23:23 GMT+02:00 Bob Spunt notifications@github.com:
Just pushed an update (20160919) that should in the least make the software work when encountering issues writing preferences to disk. Let me know if it doesn't, thanks!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/spunt/bspmview/issues/3#issuecomment-248131372, or mute the thread https://github.com/notifications/unsubscribe-auth/ABES3iNMW5x-g_gM8ZGaJN1A3p8hNhVYks5qrv1dgaJpZM4IRS2c .
But the idea to use the default preferences if the file cannot be written is good, it would have solved my issue as well.
No worries! I share your hate of permissions issues :)
Hi,
I am using the most recent version of bspmview with SPM12 on MATLAB 2013. When I upload the spmT image, I get the following error. Am I doing something wrong?
Thanks, Indra