File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -741,6 +741,16 @@ def get_unique(seqinfos, attr):
741
741
# hits, or may be we could just somehow demarkate that it will be multisession
742
742
# one and so then later value parsed (again) in infotodict would be used???
743
743
def infotoids (seqinfos , outdir ):
744
+ # In python 3.7.5 we would obtain odict_keys() object which would be
745
+ # immutable, and we would not be able to perform any substitutions if
746
+ # needed. So let's make it into a regular list
747
+ if isinstance (seqinfos , dict ) or hasattr (seqinfos , 'keys' ):
748
+ # just some checks for a paranoid Yarik
749
+ raise TypeError (
750
+ "Expected list-like structure here, not associative array. Got %s"
751
+ % type (seqinfos )
752
+ )
753
+ seqinfos = list (seqinfos )
744
754
# decide on subjid and session based on patient_id
745
755
lgr .info ("Processing sequence infos to deduce study/session" )
746
756
study_description = get_study_description (seqinfos )
You can’t perform that action at this time.
0 commit comments