ValueError with viscode "nv" during ADNI-to-BIDS conversion (Clinica 0.10.1)

18 views
Skip to first unread message

Boyu Fan

unread,
Jan 31, 2026, 12:06:46 PMJan 31
to Clinica
Dear Clinica Development Team,

I'm encountering a conversion error when using Clinica to convert ADNI data to BIDS format, and I would appreciate your guidance on resolving this issue.

Environment:
- Clinica version: 0.10.1
- Python version: 3.9.15

Dataset Details:
- ADNI cohorts: ADNI 1, 2, 3, and Go
- Selected Modalities: MRI T1 and PET 18F-FDG (original, preprocessed, and post-processed versions)
- Note: I removed all .v files from individual folders (proprietary format) before conversion as they are not supported by Clinica

- Clinical Data was acquired before Sept. 2024

Command Executed:
```bash
clinica convert adni-to-bids \
    -m T1 \
    -m PET_FDG \
    /scratch/user_id/adni_raw/ADNI \
    /scratch/user_id/adni_raw/clinical_data \
    /scratch/user_id/adni_processing/BIDS
```

Error Encountered:
The conversion fails during clinical data processing with the following error:

```
ValueError: The viscode nv is not correctly formatted. Expected a session identifier of the form 'MXXX', or a baseline identifier among {'m0', 'bl'}.
```

The error originates in the `viscode_to_session()` function at:
```
/scratch/user_id/conda/envs/clinicaEnv/lib/python3.9/site-packages/clinica/converters/_utils.py:480
```

Call chain:
1. `convert_clinical_data()` (_converter.py:161)
2. `create_adni_sessions_dict()` (_utils.py:445)
3. `_compute_session_id()` (_utils.py:339)
4. `_get_session_id_from_visit_code()` (_utils.py:400)
5. `viscode_to_session()` (_utils.py:480) ← Error raised here

Additionally, I'm seeing PerformanceWarnings about "indexing past lexsort depth" in `_utils.py:163` during diagnosis lookup operations.

Any guidance on how to proceed would be greatly appreciated.

Thank you for your time and for developing this valuable tool.

Best regards,  
Boyu Fan  
PhD Student, Biostatistics  
New York University  
bf2...@nyu.edu

Adam Ismaili

unread,
Feb 3, 2026, 12:09:12 PMFeb 3
to Clinica

Hello Boyu,

This error has already been identified and discussed in a previous issue:

https://github.com/aramis-lab/clinica/issues/1533

We are currently working on fixing the ADNI-to-BIDS converter and upgrading it to reflect the current state of the clinical data available on the IDA LONI platform. As this issue is part of the planned repairs, it will be addressed soon.

In the meantime, we recommend removing the problematic sessions from your raw dataset, or ignoring the problematic viscodes locally if you feel comfortable modifying Clinica's code.

Best regards,


Adam Ismaili

Reply all
Reply to author
Forward
0 new messages