Long working directory names

115 views
Skip to first unread message

Fred Loney

unread,
Mar 19, 2013, 10:34:45 PM3/19/13
to nipy...@googlegroups.com
I have a node that simply creates a destination directory name. The workflow fails on this node because the NiPy working directory is too long (see below). Is there a way to nudge NiPy to generate shorter working directories? A SHA-1 hash temp working directory name would be nice.

Thanks,

Fred

File: /Users/loneyf/workspace/qipipe/test/results/pipelines/qipipeline/crash-20130319-191209-loneyf-ctp_dir.a076.npz
Node: qipipeline.ctp_dir.a076
Working directory: /var/folders/tt/cws2x3ms2j13xwdyrmyf5shr0000gn/T/tmp7pSqDN/qipipeline/_dcm_files_..Users..loneyf..workspace..qipipe..test..fixtures..staging..group_dicom..sarcoma..Subj_2..S2V1..dce_concat..110909DCE_1_0003...Users..loneyf..workspace..qipipe..test..fixtures..staging..group_dicom..sarcoma..Subj_2..S2V1..dce_concat..110909DCE_1_0004_series_10_session_Sarcoma01_Session01_subject_Sarcoma01/ctp_dir


Node inputs:

dest = /Users/loneyf/workspace/qipipe/test/results/pipelines/qipipeline/sarcoma
function_str = S'def ctp_series_directory(self, dest, subject, session, series):\n    """\n    @return: the dest/subject/session/series directory path\n    """\n    import os\n    return os.path.join(dest, subject, session, series)\n'
.
ignore_exception = False
series = 10
session = Sarcoma01_Session01
subject = Sarcoma01



Traceback: 
Traceback (most recent call last):
  File "/usr/local/src/nipype/nipype/pipeline/plugins/linear.py", line 37, in run
    node.run(updatehash=updatehash)
  File "/usr/local/src/nipype/nipype/pipeline/engine.py", line 1121, in run
    outdir = make_output_dir(outdir)
  File "/usr/local/src/nipype/nipype/pipeline/utils.py", line 610, in make_output_dir
    os.makedirs(outdir)
  File "/usr/local/Cellar/python/2.7.3/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/local/Cellar/python/2.7.3/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 63] File name too long: '/var/folders/tt/cws2x3ms2j13xwdyrmyf5shr0000gn/T/tmp7pSqDN/qipipeline/_dcm_files_..Users..loneyf..workspace..qipipe..test..fixtures..staging..group_dicom..sarcoma..Subj_2..S2V1..dce_concat..110909DCE_1_0003...Users..loneyf..workspace..qipipe..test..fixtures..staging..group_dicom..sarcoma..Subj_2..S2V1..dce_concat..110909DCE_1_0004_series_10_session_Sarcoma01_Session01_subject_Sarcoma01'



Fred Loney

unread,
Mar 20, 2013, 4:42:47 PM3/20/13
to nipy...@googlegroups.com
I submitted the following pull request that fixes the problem:

SHA-1 parameterization working directory name

Fred

Juliane

unread,
May 2, 2013, 10:27:17 AM5/2/13
to nipy...@googlegroups.com
I have the same problem. Is this solution included in the newest development version?

Chris Filo Gorgolewski

unread,
Jun 1, 2013, 8:19:40 PM6/1/13
to nipy...@googlegroups.com
Still working on it (see https://github.com/nipy/nipype/pull/535) will be there soon!


--
 
---
You received this message because you are subscribed to the Google Groups "NiPy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nipy-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages