Hi Vittal, Happy new year!
I’m wondering what the first line is in your /usr/local/freesurfer/bin/asegstats2table. Can you check it by doing ‘head /usr/local/freesurfer/bin/asegstats2table’ at the prompt? Can you also try the following? 1. alias python=python2 (as suggested in previous email) 2. python asegstats2table –subjects … --tablefile … Best, Yujing From: vittal korann <vittalkor...@gmail.com> Sent: Friday, December 30, 2022 3:56 PM To: Huang, Yujing <yhuan...@mgh.harvard.edu> Cc: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu> Subject: Re: [Freesurfer] Help: Aparcstats and asegstats not working External Email - Use Caution Thanks, Yujing, for your quick response. I tried your suggestion as well but the same error keeps appearing. $ asegstats2table --subjects Met001_1 Met002_1 Met003_1 Met005_1 Met006_1 Met007_1 Met008_1 Met009_1 Met012_1 Met013_1 Met015_1 Met016_1 Met017_1 Met018_1 Met019_1 Met020_1 Met021_1 Met022_1 Met023_1 Met024_1 Met025_1 Met026_1 Met029_1 Met030_1 Met031_1 Met033_1 Met034_1 TOPIRA004_1 TOPIRA005_1 TOPIRA012_1 TOPIRA013_1 TOPIRA019_1 TOPIRA021_1 TOPIRA022_1 TOPIRA024_1 TOPIRA025_1 TOPIRA026_1 TOPIRA027_1 TOPIRA029_1 TOPIRA030_1 TOPIRA032_1 Tao101_1 Tao103_1 Tao104_1 Tao105_1 Tao106_1 Tao107_1 Tao108_1 Tao111_1 Tao112_1 Tao113_1 Tao115_1 Tao117_1 Tao118_1 Tao120_1 Tao121_1 Tao124_1 Tao126_1 Tao127_1 C001_1 C002_1 C003_1 C004_1 C005_1 C006_1 C007_1 C008_1 C009_1 C010_1 C011_1 C012_1 C013_1 C014_1 C015_1 C016_1 C017_1 C018_1 C019_1 C020_1 C021_1 C023_1 C024_1 --hemi lh --meas. area --tablefile Area_aseg_stats txt File "/usr/local/freesurfer/bin/asegstats2table", line 195 print 'ERROR: subjects are not specified (use --subjects SUBJECTS)' ^ SyntaxError: invalid syntax I do not know where I am going wrong with this. Any suggestion would be appreciated. Thanks, Vittal On Fri, Dec 30, 2022 at 12:33 PM Huang, Yujing <yhuan...@mgh.harvard.edu<mailto:yhuan...@mgh.harvard.edu>> wrote: Hi Vittal, I can only repro your error by running ‘python asegstats2table …’. And the alias solution works for me. Running ‘asegstats2table’ directly doesn’t give me any errors, and it doesn’t need the alias setting. Best, Yujing From: freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu> <freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>> On Behalf Of fsbuild Sent: Friday, December 30, 2022 12:29 AM To: freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu> Cc: vittalkor...@gmail.com<mailto:vittalkor...@gmail.com> Subject: Re: [Freesurfer] Help: Aparcstats and asegstats not working External Email - Use Caution SyntaxError: Missing parentheses in call to 'print'. Did you mean print('ERROR: atleast 1 subject must be provided')? It does not look like you are running a python 2.X. That may be because only python3 is installed by default. $ which python $ which python2 $ which python3 /bin/python3 … if you need to install python2, you can do it with ... $ sudo apt update $ sudo apt install python2 $ which python2 /bin/python2 $ python2 --version Python 2.7.18 One way or another you need “python” to report it is a 2.X version *after* you set FREESURFER_HOME and source the freesurfer setup script. To force “python” to run as “python2” you can try using an alias, $ alias python=python2 $ python --version Python 2.7.18 Similarly, if you needed python to run as python3 you could reset the alias to use =python3 instead. For the error, print 'ERROR: subjects are not specified (use --subjects SUBJECTS)’ I would check the subjects you are listing as argument can be found as directories under what SUBJECTS_DIR is currently set to. - R. The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline<https://secure-web.cisco.com/1_2BAmFE3qXv20f0ybxnN-fpsohRoOoShMxWrzjXK9S8cPNIBCYqeBbQGLqgIZ-bS3q3YXsz0yZ_PMmmrgEFH_EO4_tt6fJDXrTPAcZdKwkwdrahEUhvwBc4VPmXx1axB0sUzZgCPbDJAYvqG7Q0WYmO8u4v80Tofdemy_pdkpMpHE1elT_5uGjKF89ma5bOalsMMsKKRwD3rN6TLvd1XgaVSpJOPUAXv1ZrSDJSrcBMWP1D4DM3incUVVYwuN5coRm9CbizTb_RmmbsKji8LMAR2U21qLrSeiMvX0DmNda5ZgFhWSvgqNdRjnuKRHjms/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> .
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline <https://www.massgeneralbrigham.org/complianceline> . Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.