# RuntimeError: Exception thrown in SimpleITK ImageSeriesReader\_Execute

**URL:** <https://discourse.itk.org/t/runtimeerror-exception-thrown-in-simpleitk-imageseriesreader-execute/5484>\
**Category:** Uncategorized\
**Created:** [November 11, 2022, 1:50am UTC](https://discourse.itk.org/t/runtimeerror-exception-thrown-in-simpleitk-imageseriesreader-execute/5484 "2022-11-11T01:50:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DushiFdo](https://discourse.itk.org/letter_avatar_proxy/v4/letter/d/c68b51/32.png) [@DushiFdo](https://discourse.itk.org/u/DushiFdo)\
**Post date:** [November 11, 2022, 1:50am UTC](https://discourse.itk.org/t/runtimeerror-exception-thrown-in-simpleitk-imageseriesreader-execute/5484/1 "2022-11-11T01:50:42Z")

</div>

I am trying to read a 3D dicom image with sitk as follows:

```python
def read_first_series_in_dir(dir):
    series_reader = sitk.ImageSeriesReader()
    series_IDs = sitk.ImageSeriesReader.GetGDCMSeriesIDs(dir)
    series_file_names = sitk.ImageSeriesReader.GetGDCMSeriesFileNames(dir, series_IDs[0])
    series_reader.SetFileNames(series_file_names)    
    return series_reader.Execute()

```

I am getting the following ITK error:

```python
RuntimeError: Exception thrown in SimpleITK ImageSeriesReader_Execute: D:\a\1\sitk-build\ITK\Modules\IO\GDCM\src\itkGDCMImageIO.cxx:309:
ITK ERROR: GDCMImageIO(0000019C41D84F60): Failed to change to Implicit Transfer Syntax

```

Any help is appreciated. Thank You.
