Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion error #126

Closed
mainux opened this Issue Jan 2, 2018 · 10 comments

Comments

Projects
None yet
5 participants
@mainux
Copy link

commented Jan 2, 2018

Dear all,

I'm running heudiconv on several subjects and it is running quite nice, but with one subject i got the following error:

INFO: Need to process 1 study sessions
INFO: PROCESSING STARTS: {'subject': '09HBP0932S2', 'outdir': '/home/mtermenon/public/HBP_MaiteCesar/BIDS/', 'session': None}
INFO: Processing 9047 dicoms
INFO: Analyzing 9047 dicoms
Traceback (most recent call last):
File "/opt/anaconda3/bin/heudiconv", line 2197, in
main()
File "/opt/anaconda3/bin/heudiconv", line 2189, in main
return _main(args)
File "/opt/anaconda3/bin/heudiconv", line 2052, in _main
min_meta=args.minmeta)
File "/opt/anaconda3/bin/heudiconv", line 1364, in convert_dicoms
grouping=None, # no groupping
File "/opt/anaconda3/bin/heudiconv", line 425, in group_dicoms_into_seqinfos
assert studyUID == file_studyUID
AssertionError

Any idea?

Thanks in advance,

Maite

@mgxd

This comment has been minimized.

Copy link
Member

commented Jan 2, 2018

@mainux sorry for the cryptic error - after #119 this was made more explicit. Heudiconv is finding 2 or more different sessions for that subject. You can work around this by specifying the session (here's an example)

@mainux

This comment has been minimized.

Copy link
Author

commented Jan 3, 2018

Thank you for your answer @mgxd , but that is strange because there is only one session per subject in this experiment, so it is not possible that it is finding 2 or more.

@mgxd

This comment has been minimized.

Copy link
Member

commented Jan 3, 2018

@mainux could you update your heudiconv version and rerun? The new error message will explicitly tell you which dicoms are conflicting

@mainux

This comment has been minimized.

Copy link
Author

commented Jan 4, 2018

Hi @mgxd,

I've just followed the instructions of the website, I think it is in the latest version, and it shows exactly the same message, nothing new:

[root@brodmann45 bin]# ./pip install
https://github.com/nipy/heudiconv/archive/master.zip
Collecting https://github.com/nipy/heudiconv/archive/master.zip
  Downloading https://github.com/nipy/heudiconv/archive/master.zip
     \ 102kB 294kB/s
  Requirement already satisfied (use --upgrade to upgrade):
heudiconv==0.4 from
https://github.com/nipy/heudiconv/archive/master.zs
Requirement already satisfied: nibabel in
/opt/anaconda3/lib/python3.6/site-packages (from heudiconv==0.4)
Requirement already satisfied: pydicom in
/opt/anaconda3/lib/python3.6/site-packages (from heudiconv==0.4)
Requirement already satisfied: nipype in
/opt/anaconda3/lib/python3.6/site-packages (from heudiconv==0.4)
Requirement already satisfied: pathlib in
/opt/anaconda3/lib/python3.6/site-packages (from heudiconv==0.4)
Requirement already satisfied: scipy>=0.14 in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: numpy>=1.9.0 in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: networkx>=1.9 in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: traits>=4.6 in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: simplejson>=3.8.0 in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: configparser in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: prov==1.5.0 in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: future>=0.16.0 in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: click>=6.6.0 in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: packaging in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: pydot>=1.2.3 in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: pydotplus in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: pytest>=3.0 in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: mock in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: python-dateutil>=2.2 in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: funcsigs in
/opt/anaconda3/lib/python3.6/site-packages (from
nipype->heudiconv==0.4)
Requirement already satisfied: decorator>=4.1.0 in
/opt/anaconda3/lib/python3.6/site-packages (from
networkx>=1.9->nipype->heudico)
Requirement already satisfied: six>=1.9.0 in
/opt/anaconda3/lib/python3.6/site-packages (from
prov==1.5.0->nipype->heudiconv==0.4)
Requirement already satisfied: rdflib>=4.2.1 in
/opt/anaconda3/lib/python3.6/site-packages (from
prov==1.5.0->nipype->heudiconv==0)
Requirement already satisfied: lxml in
/opt/anaconda3/lib/python3.6/site-packages (from
prov==1.5.0->nipype->heudiconv==0.4)
Requirement already satisfied: pyparsing in
/opt/anaconda3/lib/python3.6/site-packages (from
packaging->nipype->heudiconv==0.4)
Requirement already satisfied: setuptools in
/opt/anaconda3/lib/python3.6/site-packages (from
pytest>=3.0->nipype->heudiconv==0.4)
Requirement already satisfied: attrs>=17.2.0 in
/opt/anaconda3/lib/python3.6/site-packages (from
pytest>=3.0->nipype->heudiconv==0)
Requirement already satisfied: py>=1.5.0 in
/opt/anaconda3/lib/python3.6/site-packages (from
pytest>=3.0->nipype->heudiconv==0.4)
Requirement already satisfied: pluggy<0.7,>=0.5 in
/opt/anaconda3/lib/python3.6/site-packages (from
pytest>=3.0->nipype->heudiconv)
Requirement already satisfied: pbr>=0.11 in
/opt/anaconda3/lib/python3.6/site-packages (from
mock->nipype->heudiconv==0.4)
Requirement already satisfied: isodate in
/opt/anaconda3/lib/python3.6/site-packages (from
rdflib>=4.2.1->prov==1.5.0->nipype->heu)
[root@brodmann45 bin]#
@mgxd

This comment has been minimized.

Copy link
Member

commented Jan 4, 2018

you'll have to do pip install --upgrade https://github.com/nipy/heudiconv/archive/master.zip

@yarikoptic

This comment has been minimized.

Copy link
Member

commented Feb 22, 2018

@mainux success?

@mgxd

This comment has been minimized.

Copy link
Member

commented Mar 5, 2018

closing - feel free to reopen

@mgxd mgxd closed this Mar 5, 2018

@thomshaw92

This comment has been minimized.

Copy link

commented Sep 7, 2018

@mgxd I have a similar problem when my participants leave the scanner (usually for a break) then come back in. Throws the error:

WARNING: dcmstack without support of pydicom >= 1.0 is detected. Adding a plug
Traceback (most recent call last):
  File "/data/home/uqtshaw/miniconda3/bin/heudiconv", line 11, in <module>
    load_entry_point('heudiconv==0.5.2.dev0', 'console_scripts', 'heudiconv')()
  File "/data/home/uqtshaw/miniconda3/lib/python3.6/site-packages/heudiconv/cli/run.py", line 125, in main
    process_args(args)
  File "/data/home/uqtshaw/miniconda3/lib/python3.6/site-packages/heudiconv/cli/run.py", line 338, in process_args
    overwrite=args.overwrite,)
  File "/data/home/uqtshaw/miniconda3/lib/python3.6/site-packages/heudiconv/convert.py", line 159, in prep_conversion
    grouping=None)
  File "/data/home/uqtshaw/miniconda3/lib/python3.6/site-packages/heudiconv/dicoms.py", line 88, in group_dicoms_into_seqinfos
    studyUID, file_studyUID
AssertionError: Conflicting study identifiers found [1.3.12.2.1107.5.2.34.18975.30000018042610110307800104208, 1.3.12.2.1107.5.2.34.18975.30000018042610110307800107585].

PS i'm running heudiconv latest:

INFO: Running heudiconv version 0.5.2-dev
INFO: Need to process 1 study sessions
INFO: PROCESSING STARTS: {'subject': '1078SP', 'outdir': '/data/fasttemp/uqtshaw/data/', 'session': '01'}

Any workaround for this one? :)

@yarikoptic

This comment has been minimized.

Copy link
Member

commented Sep 7, 2018

if you had the same accession number specified, you could use -g accession_number to bring them together by accession number

@hcp4715

This comment has been minimized.

Copy link

commented Apr 9, 2019

I have the same problem as @thomshaw92 ,
AssertionError: Conflicting study identifiers found [1.2.276.0.38.1.1.1.5691.20180625154719.153078980, 1.3.12.2.1107.5.2.32.35333.30000018062607273992600000010].

Below is the folder structure of that day's data, still can not identify the two scans that conflict. Any suggestions? Thanks in advance.

Screenshot from 2019-04-09 22-54-26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.