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

TypeError in Acquisition.init() when running dcm2bids #280

Closed
mtmmu88 opened this issue Oct 15, 2023 · 1 comment
Closed

TypeError in Acquisition.init() when running dcm2bids #280

mtmmu88 opened this issue Oct 15, 2023 · 1 comment

Comments

@mtmmu88
Copy link

mtmmu88 commented Oct 15, 2023

Description:
I am encountering a TypeError when trying to convert DICOM files to BIDS format using dcm2bids. The error message indicates that Acquisition.init() is missing 2 required positional arguments: 'datatype' and 'suffix'.
Steps to Reproduce:
Run dcm2niix to convert DICOM to NIfTI:
dcm2niix -z y -f %p_%s -o /home/zzc/gwx/SRS00004 /home/zzc/gwx/SRS00004
This step completes successfully.
Run dcm2bids:
dcm2bids -d /home/zzc/gwx/SRS00004 -p sub-01 -c /path/to/config.json --force_dcm2bids
This step fails with the following error:
TypeError: Acquisition.init() missing 2 required positional arguments: 'datatype' and 'suffix'
Expected Behavior:
I expect dcm2bids to successfully convert the DICOM files to BIDS format.

Actual Behavior:
The program crashes with a TypeError.

Environment:
OS: Linux-6.2.0-34-generic-x86_64-with-glibc2.35
Python version: 3.12.0
dcm2bids version: 3.1.1
dcm2niix version: v1.0.20230411
Additional Information:
I have tried simplifying the config.json to only include the SeriesDescription field, but the issue persists.

Here is my simplified config.json:
{
"descriptions": [
{
"dataType": "anat",
"modalityLabel": "T1w",
"criteria": {
"SeriesDescription": "OAx 3D T1BRAVO"
}
}
]
}
Any help would be greatly appreciated.

@arnaudbore
Copy link
Contributor

Dear @mtmmu88 ,

You are using dcm2bids 3.1.1.
Please follow these instructions to modify your config file accordingly: https://unfmontreal.github.io/Dcm2Bids/3.1.1/upgrade/#upgrading-from-2x-to-3x

We also highly suggest people to post their issues on https://neurostars.org/ using the dcm2bids tag.
There are even more people able to help you on this forum than here on github.

If you have any questions, please post them there.

Best,
Arnaud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants