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'
From juanprie...@gmail.com on October 13, 2014 19:25:34
What steps will reproduce the problem? import sys import dicom import dicom_dao import json
filename = sys.argv[1]
try: dcmfile = dicom.read_file(, 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'
Attachment: IM-0002-0010-0001.dcm
Original issue: http://code.google.com/p/pydicom/issues/detail?id=152