Dear FreeSurfer Experts
While performing the long_mris_slopes --qdec I receive the following error:
Traceback (most recent call last): File "/Applications/freesurfer/bin/long_mris_slopes", line 1125, in <module> shutil.rmtree(dirname) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 253, in rmtree File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 251, in rmtree OSError: [Errno 66] Directory not empty: './tmp-lhab_2ur8.base_lh_thickness_f9caSb'
I tried to solve the problem with tips from the internet but could not fix it. The directory is empty and every time I try for perform a new long_mris_slopes --qdec I receive the same error concerning another subject's folder like:
Traceback (most recent call last): File "/Applications/freesurfer/bin/long_mris_slopes", line 1125, in <module> shutil.rmtree(dirname) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 253, in rmtree File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 251, in rmtree OSError: [Errno 66] Directory not empty: './tmp-lhab_1lwe.base_lh_thickness_E_ExHB'
Can you please help me with this?
Thank you in advance.
Sincerely, Ben
Hi Benedikt,
hmm, strange. The rmtree command should delete the temp directory with everything in it. Are there any read only files in the directory? If it is empty check for hidden files (starting with a . )? Could also be a race condition, that some temp file is still being created while it is deleting or some other OS related problem. Maybe try adding "ignore_error=TRUE" for now to all calls to rmtree inside the script:
|shutil.rmtree(<whatever>,ignore_errors=True) |
This probably will leave the temp directories behind, but at least it can continue.
Martin
On 10/15/2015 05:18 AM, Benedikt Wenk wrote:
Dear FreeSurfer Experts
While performing the long_mris_slopes --qdec I receive the following error:
/Traceback (most recent call last):/ ///File "/Applications/freesurfer/bin/long_mris_slopes", line 1125, in <module>/ ///shutil.rmtree(dirname)/ ///File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 253, in rmtree/ ///File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 251, in rmtree/ /OSError: [Errno 66] Directory not empty: './tmp-lhab_2ur8.base_lh_thickness_f9caSb'/ / / I tried to solve the problem with tips from the internet but could not fix it. The directory is empty and every time I try for perform a new long_mris_slopes --qdec I receive the same error concerning another subject's folder like:
/Traceback (most recent call last):/ ///File "/Applications/freesurfer/bin/long_mris_slopes", line 1125, in <module>/ ///shutil.rmtree(dirname)/ ///File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 253, in rmtree/ ///File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 251, in rmtree/ /OSError: [Errno 66] Directory not empty: './tmp-lhab_1lwe.base_lh_thickness_E_ExHB'/ / / /Can you please help me with this?/ / / /Thank you in advance./ / / /Sincerely,/ /Ben/
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu