sibis-platform / ncanda-data-integration

This is the Data Integration, MRI, and Bioinformatics Component of the National Consortium on Alcohol and NeuroDevelopment in Adolescence (NCANDA), funded by the NIAAA.
https://www.nitrc.org/projects/ncanda-datacore
BSD 3-Clause "New" or "Revised" License
4 stars 10 forks source link

TypeError: bad operand type for abs(): 'str' #500

Closed gcyoung1 closed 2 years ago

gcyoung1 commented 2 years ago

/sibis-software/ncanda-data-integration/scripts/redcap/import_mr_sessions --pipeline-root-dir /fs/ncanda-share/cases --run-pipeline-script /fs/ncanda-share/scripts/bin/ncanda_all_pipelines -f --study-id C-70183-F-1 stdout: b'' stderr: b'Traceback (most recent call last):\n File "/sibis-software/ncanda-data-integration/scripts/redcap/import_mr_sessions", line 907, in \n [xnat_data,errFlag] = get_xnat_data(session,red2cas,\n File "/sibis-software/ncanda-data-integration/scripts/redcap/import_mr_sessions", line 411, in get_xnat_data\n scans_by_type = get_scans_by_type(red2cas,usable_scans_list, visit_date, redcap_visit_id)\n File "/sibis-software/ncanda-data-integration/scripts/redcap/import_mr_sessions", line 172, in get_scans_by_type\n scans = sorted( [ (eid, xnat_url, scan, red2cas.days_between_dates(visit_date,xnat_sessions_dict[eid][0])) for (scan_type,eid,xnat_url,scan) in usable_scans_list if re.match( '^ncanda-%s-v1' % type, scan_type ) ], key=lambda x: abs(x[2]) )\nTypeError: bad operand type for abs(): 'str'\n'

kipohl commented 2 years ago

@gcyoung1 can you properly catch this error message ?