google-code-export / pydicom

Automatically exported from code.google.com/p/pydicom
0 stars 0 forks source link

Typo in write_numbers #131

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enter a large number of new tags, with some VR, I haven't confirmed which yet
2. attempt to write the image

What is the expected output? What do you see instead?
The expected output would be for the image to write correctly, writing all tags

What version of the product are you using?
0.9.8

Please provide any additional information below.

Here's a printout of the error stack, and down at the bottom I think that 
'data_elemesnt' should be 'data_elements' or 'data_element'

  File "/Library/Python/2.7/site-packages/dicom/filewriter.py", line 344, in write_file
    write_dataset(fp, dataset)
  File "/Library/Python/2.7/site-packages/dicom/filewriter.py", line 196, in write_dataset
    write_data_element(fp, dataset[tag], dataset_encoding)
  File "/Library/Python/2.7/site-packages/dicom/filewriter.py", line 167, in write_data_element
    writers[VR][0](fp, data_element, writers[VR][1])
  File "/Library/Python/2.7/site-packages/dicom/filewriter.py", line 48, in write_numbers
    raise IOError("{0}\nfor data_element:\n{1}".format(str(e), str(data_elemesnt)))
NameError: global name 'data_elemesnt' is not defined

Original issue reported on code.google.com by zulu.the...@gmail.com on 13 Aug 2013 at 2:32

GoogleCodeExporter commented 9 years ago
Unfortunately that's just a bug in the error reporting that was fixed post 
0.9.8, and hides the original error. Could you change "data_elemesnt" to 
"data_element" at that line 48 in filewriter.py and run it again?

Original comment by rickard....@gmail.com on 14 Aug 2013 at 1:26

GoogleCodeExporter commented 9 years ago
This had already been fixed in the repository code.

Original comment by darcymason@gmail.com on 15 Sep 2013 at 10:17