Error with 3dNwarpApply

I’ve been running a script on another machine that hasn’t had any issues. I recently moved to a new machine and attempted to run the same script, with the following error:


3dNwarpApply -source anat_mprage_unif_ns_shft+orig -master anat_final.ERwD001+tlrc -ainterp wsinc5 -nwarp anat.aff.qw_WARP.nii anat.aff.Xat.1D anat_mprage_unif_ns_shft_al_keep_mat.aff12.1D -prefix anat_wo_skull_warped
++ 3dNwarpApply: AFNI version=AFNI_17.1.12 (Jun 23 2017) [64-bit]
++ Authored by: Zhark the Warped
++ opened source dataset 'anat_mprage_unif_ns_shft+orig'
++ -master dataset is 'anat_final.ERwD001+tlrc'
++ Processing -nwarp e[7m** ERROR:e[0m Can't open dataset from file 'anat_mprage_unif_ns_shft_al_keep_mat.aff12.PŸ@`Ù'
e[7m** ERROR:e[0m Can't open/process 3D warp dataset 'anat_mprage_unif_ns_shft_al_keep_mat.aff12.PŸ@`Ù'
e[7m** ERROR:e[0m Can't compute nonlinear 3D warp from string 'anat.aff.qw_WARP.nii anat.aff.Xat.1D anat_mprage_unif_ns_shft_al_keep_mat.aff12.PŸ@`Ù'

e[7m** FATAL ERROR:e[0m Cannot process warp string 'anat.aff.qw_WARP.nii anat.aff.Xat.1D anat_mprage_unif_ns_shft_al_keep_mat.aff12.PŸ@`Ù'
** Program compile date = Jun 23 2017

For whatever reason, it replaced the ending of one of the .1D files with “.PŸ@`Ù”. In another attempt to run the script (with the hopes that it was a random glitch) it gave me “.P?@G?” instead.

If anyone has any thoughts (or if I’ve missed something obvious) I’d appreciate it!

macOS Sierra version 10.12.5
afni -ver: Precompiled binary macosx_10.7_local: Jun 23 2017 (Version AFNI_17.1.12)

Occasionally text files and scripts get a bit clobbered. My usual troubleshooting is to open the script with TextWrangler, and check to see if you see hidden characters. You can also use the program to save as plain text and set the new line character as Linux/Unix.

-Pete

An additional option is to run “file_tool -test -infile FILE”, and
see what it says. If you also supply a -prefix option for output,
it will try to fix any bad characters.

This is not necessarily any better than Peter’s suggestion.

  • rick

Thank you both for the advice! I just threw quotes around the offending filename and it worked fine…file_tool didn’t reveal any bad characters after that.

Thanks!