Skip to content

Commit

Permalink
Log exception (as error) if we fail to obtain affine in convertall
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikoptic committed Mar 3, 2023
1 parent f2570f4 commit de1a470
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions heudiconv/heuristics/convertall.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import logging
import os

lgr = logging.getLogger('heudiconv')


def create_key(template, outtype=('nii.gz',), annotation_classes=None):
if template is None or not template:
Expand All @@ -16,6 +19,7 @@ def custom_seqinfo(series_files, wrapper, **kw):
try:
affine = wrapper.affine.tostring()
except WrapperError:
lgr.exception("Errored out while obtaining/converting affine")
affine = None
return affine, series_files[0]

Expand Down

0 comments on commit de1a470

Please sign in to comment.