Heudiconv Assertion Error

Dear all,

I have the same problem as mentioned by @thomshaw92 in this issue:

AssertionError: Conflicting study identifiers found [,].

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

This looks like a HeuDiConv error and not fMRIPrep, correct?

1 Like

Good catch, Chris.
Re-edited the title and tag.

I had something similar which I tracked down to clashes in the “Study Instance UID” using Dicom Browser (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3447088/). Hope this is helpful.

1 Like

Hi, @cassgvp,

thanks so much for your help!!
May I further ask how you used dicombrowser?
I tried to use dicombrowser in Ubuntu 18.04, downloaded " dicombrowser_linux_1_7_0b5.deb" and then installed it by double click.
But, even after that, I couldnot find the GUI of it.

I assumed that dicombrowser depends on Java, but then I found that I could not install java because:

401 Authorization Required

Username/Password Authentication Failed.
download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 installed oracle-java8-installer package post-installation script subprocess returned error exit status 1
Processing triggers for shared-mime-info (1.9-2) ...
Setting up oracle-java11-set-default (11.0.2-2~linuxuprising1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for fontconfig (2.12.6-0ubuntu2) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any suggestions are appreciated, Now I really feel a bit frustrated, after a long way trying to use fmriprep (dual-boot ubuntu -> heudiconv and fmriprep for single subject, but now stuck by this).

I installed dicombrowser locally on my Mac, and moved one participant from our HPC to my local drive to check. Sorry I can’t be more help with the linux install … You could try another tool for viewing the dicom header info?

Incase it helps, I had the assertion error when I was trying to run heudiconv on dicom data which had all been collapsed into a single folder from two different sessions. My conflict was in the key for the acquisition date, which was obviously different for the two sessions, but heudiconv was expecting data for one session only.

I feel your pain. It’s never easy, but you’ve come this far and I’m sure you’ll crack it :+1:


Hi, @cassgvp,

Thanks for you kind words. I went back to windows to install dicombrowser and it worked.

Then, I compared the problematic session with other normal sessions and found that that session has two study ID numbers, and each of they with a series of scans (series number). I have no idea what we have done during the scanning caused this situation.

I guess that’s the problem. I will try to merge all these series to one session by assign study ID and series number to those with wrong information and try again.

update: I changed study ID, study instance UID (which is the number in error message) and no more Assertion Error.

I was having a similar problem (we had to reboot the scanner console ~67% into the scanning session for a participant) and found a painless solution here (posted by sjburwell; https://github.com/sjburwell), which reads all the DICOMs and replaces any inconsistent studyUIDs to match the first one:

Hope this is helpful for anyone running into this problem in the future.