2. Error messages¶
Errors are often a little confusing, so here are some common
AFNI error messages, along with what they might imply.
2.1. Unix error messages¶
2.1.1. Command not found.¶
There are many ways one could accidentally get this error. It means the shell does not know of a command or program by the given name.
having a typo in the command name
$PATHis not properly configureds, so the shell does not know about a given program
rehashis needed - a new program is in a
$PATHdirectory, but the t-shell does not know about it (it is not in the hash table)
incorrect use of
\characters at the end of some line(s)
The problem is on the line before the one mentioned in the error.
\characters must be the final character on a given line, followed by a Unix newline character. Any misuse of it at the end of a line means the the will terminate the current command on that line, as well as consider any subsequent line the start of a new command. For example:3dDeconvolve -input rall_vr+orig \ -concat concat_file.txt -num_stimts 8 \ ...
That leads to early termination of the
3dDeconvolvecommand, which would make it fail (with or without error, depending on the options actually getting passed).
It would lead to a the shell viewing
-num_stimts 8as the start of a new command, resulting in the error:-stim_times: Command not found.
Note that spaces or tabs after any final
\would also break the line coninuation interpretation, but they are difficult to see.
Also, non-Unix newline characters can be problematic.
For help with such things, consider
file_tool, e.g.:file_tool -test -infile my_script.txt
2.1.2. Undefined variable.¶
This error means no variable exists by the given name.
maybe there is a typo in the variable name
maybe the script author forgot to set the variable
maybe the variable was set in a child shell and does not exist in this context (or even in a different terminal window shell)
2.1.3. others - todo¶
ls: …: No such file or directory