Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Crashed when character cannot encoded in meta inforation #119

Open
JeffreySu opened this issue Apr 9, 2019 · 3 comments
Open

Crashed when character cannot encoded in meta inforation #119

JeffreySu opened this issue Apr 9, 2019 · 3 comments

Comments

@JeffreySu
Copy link

I have a set of .dcm with patient's Chinese name, I can read it out in other applications (even though some of them display messy code) ,but when I try to open it in dicompyler, it seems not supported to fault-tolerant the uncodified character.

When I use Open Quick to open just one .dcm it's OK, but when I use Open Patient, it crashed.

Information in Error window as following:

Platform information:
System: Windows
Version: ('post2008Server', '6.2.9200', '', u'Multiprocessor Free')
Python Version: 2.6.6
dicompyler Version: 0.4.2

dicompyler.dicomgui: DEBUG: Reading: E:\ct\lxj\143.dcm
dicompyler.dicomgui: DEBUG: Reading:E:\ct\lxj\144.dcm
dicompyler.dicomgui: DEBUG: Reading:E:\ct\lxj\145.dcm
dicompyler.dicomgui: DEBUG: Reading:E:\ct\lxj\146.dcm
dicompyler: ERROR: Unhandled exception: Traceback (most recent call last):
  File "main.py", line 727, in Run
  File "threading.pyo", line 484, in run
  File "dicompyler\dicomgui.pyo", line 703, in GetPatientData
UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-6: ordinal not in range(128)
@bastula
Copy link
Owner

bastula commented Apr 11, 2019

Are you able to run the latest version from source to test if this has been resolved? If not, do you mind to send an anonymized DICOM file?

@shengyusideyouxi
Copy link

I met the same question. So how to deal with it....

@bastula
Copy link
Owner

bastula commented Aug 11, 2021

@shengyusideyouxi In your post on the dicompyler group, the issue is actually with the folder name:D:\安装包\testdata2014\focus_output\SS.rtp1.12.20080627A.5.dcm If you are able to move the DICOM files to a non-Chinese folder name it will work. The other option is to run the program from source.

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

No branches or pull requests

3 participants