EOFError: Compressed file ended before the end-of-stream marker was reached - T1 preprocessing using nipype

this looks like a nibabel issue. i believe this could be from either an actually corrupted file or the way gzip is being used.

i fixed a version of this while writing a compressed file in nipype here, but that is unrelated to this issue.