Page 1 of 1

Locked files

Posted: Thu Dec 06, 2018 2:29 am
by willsnyder12
Hello,

I am attempting to convert freesurfer files to those compatible with morphologist using the freezurfer import to morphologist tool. When executing this from the command line using axon-runprocess —enabledb, I will sometimes randomly have outputs become locked, and scripts I use after (such as morphologist from the command line) that depend on these now locked files will not run properly. Is there any way to remove locks without the GUI? I could not find a command that removes locks but if there is some way, I would like to implement it in my script.

Thanks!
Will

Re: Locked files

Posted: Sun Dec 16, 2018 9:00 pm
by riviere
Hi Will,
Yes the freesurfer conversion tools locks some files to prevent them from being re-processed and overwritten by a "regular" brainvisa run. Why is it a problem if you are not actually re-writing these files ?
Anyway you're right, I don't think we have a non-GUI process to unlock files: it can be done using the GUI (database browser) only.
We should probably make one when we get time to...
In the mean time, if you are a bit familiar with axon API, it's a matter of calling item.unlockData() on a DiskItem instance (any file or directory parameter in a process is a DiskItem).
Denis

Re: Locked files

Posted: Tue Feb 05, 2019 8:20 pm
by willsnyder12
Hi Denis,
I could not load those files into scripts that required them as input, but the item.unlockData() worked well (as well as just simply removing the lock file).

Thank you!
Will