2

This is the code:

import dicom

ds = dicom.read_file(FILE_PATH)
print(ds)

Error:

LookupError: unknown encoding: ISO 2022 IR 100

When using pydicom in order to look at data, I got the error above. I found 'ISO 2022 IR 100': 'latin_1' ,according to here.

However, I didn't get how to fix this problem. Can you help me to solve this error?

  • That encoding was [added two years ago](https://github.com/pydicom/pydicom/pull/211). Can you verify that you are running an up-to-date version of pydicom? – chrisaycock Aug 06 '17 at 05:41

1 Answers1

1

As indicated in the comments, the culprit was an out-of-date version of pydicom. Upgrading to a more recent version fixed this issue.

chrisaycock
  • 36,470
  • 14
  • 88
  • 125
  • 1
    As following comment and your answer, I've upgrade pydicom from git and then the problem is solved. (pydicom version is now 1.0.0a1 from 0.9.9 ) What I did is: 1. upgrade pydicom by terminal pip install git+https://github.com/pydicom/pydicom.git 2. Change python code a bit import dicom -> import pydicom as dicom Then, it works!!. Cheers – Akira Kitamura Aug 06 '17 at 06:23
  • Above is slightly wrong. 2. pip install git+https://github.com/pydicom/pydicom.git – Akira Kitamura Aug 27 '17 at 05:50