Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Difficulty-Medium
New issue 152 by
juanprie...@gmail.com: ValueError: invalid literal for
int() with base 10: 'F'
https://code.google.com/p/pydicom/issues/detail?id=152
What steps will reproduce the problem?
import sys
import dicom
import dicom_dao
import json
filename = sys.argv[1]
try:
dcmfile = dicom.read_file(<file in attachement>, force=True )
except:
print "DICOM not readable"
raise
dicomJson = dicom_dao.pydicom2json(dcmfile)
jsdmp = json.dumps(dicomJson[0])
print jsdmp
What is the expected output? What do you see instead?
The expected output is the json document for the dicom header of the file
What version of the product are you using?
pydicom-0.9.8
Additional information including the trace of the error.
dcm.remove_private_tags() # No support for now
File "/Library/Python/2.7/site-packages/dicom/dataset.py", line 459, in
remove_private_tags
self.walk(RemoveCallback)
File "/Library/Python/2.7/site-packages/dicom/dataset.py", line 568, in
walk
data_element = self[tag]
File "/Library/Python/2.7/site-packages/dicom/dataset.py", line 285, in
__getitem__
self[tag] = DataElement_from_raw(data_elem, character_set)
File "/Library/Python/2.7/site-packages/dicom/dataelem.py", line 338, in
DataElement_from_raw
value = convert_value(VR, raw, encoding)
File "/Library/Python/2.7/site-packages/dicom/values.py", line 193, in
convert_value
value = converter(byte_string, is_little_endian, num_format)
File "/Library/Python/2.7/site-packages/dicom/values.py", line 66, in
convert_IS_string
return MultiString(byte_string, valtype=
dicom.valuerep.IS)
File "/Library/Python/2.7/site-packages/dicom/valuerep.py", line 212, in
MultiString
return valtype(val) if val else val
File "/Library/Python/2.7/site-packages/dicom/valuerep.py", line 172, in
__new__
newval = super(IS, cls).__new__(cls, val)
ValueError: invalid literal for int() with base 10: 'F'
Attachments:
IM-0002-0010-0001.dcm 522 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings