Hello,
That AFNI_17.0.09 version is 2.5 years old, and pre-dates the main updates to python3. It might be worth getting a newer version of AFNI.
In any case, RetroTS.py has not been updated to python3 yet. For that matter, afni_restproc.py is still python2, and was declared "no longer supported" by its author back in 2012.
Maybe you should consider switching to afni_proc.py, if that is an option. Though either way, we need to update RetroTS.py. Can you use a python2 method for running that program?
- rick