AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
May 10, 2022 01:24AM
Dear afni experts:

I came across the attached errors when running the scripts generated by afni_proc.py. Apparently the error is from the following lines in the scripts generated from afni_proc.py.

# write AP uvars into a simple txt file
cat << EOF > out.ap_uvars.txt
  out_limit      : 0.15
  copy_anat      :                                                        \
      sub-0163_ses-01_space-MNI152NLin2009cAsym_desc-preproc_T1w+tlrc.HEAD
  mask_dset      : full_mask.$subj+tlrc.HEAD
  ss_review_dset : out.ss_review.$subj.txt
EOF

# and convert the txt format to JSON
cat out.ap_uvars.txt | afni_python_wrapper.py -eval "data_file_to_json()" \
  > out.ap_uvars.json

Any advice will be appreciated.

Erik Chang

The error message
cat out.ap_uvars.txt
afni_python_wrapper.py -eval data_file_to_json()
gen_ss_review_scripts.py -exit0 -init_uvars_json out.ap_uvars.json -write_uvars_json out.ss_review_uvars.json
Traceback (most recent call last):
  File "/home/tcnl/abin/gen_ss_review_scripts.py", line 3402, in <module>
    sys.exit(main())
  File "/home/tcnl/abin/gen_ss_review_scripts.py", line 3379, in main
    rv = me.process_options()
  File "/home/tcnl/abin/gen_ss_review_scripts.py", line 1115, in process_options
    dfill = UTIL.read_json_file(C.udict_in)
  File "/home/tcnl/abin/afnipy/afni_util.py", line 343, in read_json_file
    return json.loads(textdata)
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The afni_proc.py command
# ==========================================================================
# script generated by the command:
#
# afni_proc.py -subj_id sub0163.CSPLIN -script proc.CSPLIN.sub0163                                                                                       \
#     -scr_overwrite -blocks mask blur regress -copy_anat                                                                                                \
#     /media/tcnl/data2/GRIPFORCE/out/fmriprep/sub-0163/ses-01/anat/sub-0163_ses-01_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz                    \
#     -dsets                                                                                                                                             \
#     /media/tcnl/data2/GRIPFORCE/out/fmriprep/sub-0163/ses-01/func/sub-0163_ses-01_task-GFORCE_run-1_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz \
#     /media/tcnl/data2/GRIPFORCE/out/fmriprep/sub-0163/ses-01/func/sub-0163_ses-01_task-GFORCE_run-2_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz \
#     -tcat_remove_first_trs 0 -blur_size 4.0 -regress_stim_times                                                                                        \
#     /media/tcnl/data2/GRIPFORCE/beh/sub-0163_ses-01_task-GFORCE_run-01-40%.1D                                                                          \
#     /media/tcnl/data2/GRIPFORCE/beh/sub-0163_ses-01_task-GFORCE_run-01-60%.1D                                                                          \
#     /media/tcnl/data2/GRIPFORCE/beh/sub-0163_ses-01_task-GFORCE_run-02-40%.1D                                                                          \
#     /media/tcnl/data2/GRIPFORCE/beh/sub-0163_ses-01_task-GFORCE_run-02-60%.1D                                                                          \
#     -regress_stim_labels R40 R60 L40 L60 -regress_basis                                                                                                \
#     'CSPLIN(-4.8,16.8,10)' -regress_extra_stim_files                                                                                                   \
#     /media/tcnl/data2/GRIPFORCE/out/fmriprep/sub-0163/ses-01/func/sub-0163_ses-01_task-GFORCE_desc-confounds_sel_timeseries.1D                         \
#     -regress_extra_stim_labels non_interest -regress_opts_3dD -jobs 20                                                                                 \
#     -num_glt 11 -gltsym 'SYM: L60[3..6] -L40[3..6]' -glt_label 1 L60-L40                                                                               \
#     -gltsym 'SYM: R60[3..6] -R40[3..6]' -glt_label 2 R60-R40 -gltsym 'SYM:                                                                             \
#     L40[3..6] +L60[3..6] -R60[3..6] -R40[3..6]' -glt_label 3 L-R -gltsym                                                                               \
#     'SYM: L60[3..6] +R60[3..6] -L40[3..6] -R40[3..6]' -glt_label 4 60-40                                                                               \
#     -gltsym 'SYM: -1*L60[0..2] +1*L60[3..6]' -glt_label 5 L60_all -gltsym                                                                              \
#     'SYM: -1*R60[0..2] +1*R60[3..6]' -glt_label 6 R60_all -gltsym 'SYM:                                                                                \
#     -1*L40[0..2] +1*L40[3..6]' -glt_label 7 L40_all -gltsym 'SYM:                                                                                      \
#     -1*R40[0..2] +1*R40[3..6]' -glt_label 8 R40_all -gltsym 'SYM: R40[3..6]                                                                            \
#     +R60[3..6] -L40[3..6] -L60[3..6]' -glt_label 9 R-L -gltsym 'SYM:                                                                                   \
#     R60[3..6] -R40[3..6] -L60[3..6] +L40[3..6]' -glt_label 10 int1                                                                                     \
#     -regress_compute_fitts -regress_make_ideal_sum sum_ideal.1D                                                                                        \
#     -regress_est_blur_epits -regress_est_blur_errts -mask_apply epi                                                                                    \
#     -regress_censor_outliers 0.15 -regress_reml_exec

Subject Author Posted

afni_python_wrapper.py error

audachang May 10, 2022 01:24AM

Re: afni_python_wrapper.py error

rick reynolds May 10, 2022 09:11AM

Re: afni_python_wrapper.py error

audachang May 12, 2022 09:56PM

Re: afni_python_wrapper.py error

rick reynolds May 13, 2022 09:20AM

Re: afni_python_wrapper.py error

audachang May 17, 2022 08:38PM

Re: afni_python_wrapper.py error

rick reynolds May 18, 2022 04:08PM

Re: afni_python_wrapper.py error

audachang May 18, 2022 07:07PM

Re: afni_python_wrapper.py error

rick reynolds May 20, 2022 01:44PM