Closed suever closed 9 years ago
From pierre.raybaut on April 12, 2010 04:42:23
Update: please ignore the second error in traceback* (it's related to Spyder's external console and it has nothing to do with this bug -- I've also tested this outside any IDE, in a simple Python interpreter).
(*) This error has to be ignored in the attached file: File "D:\Python\spyder\spyderlib\widgets\externalshell\sitecustomize.py", line 43, in displayhook sys.displayhook(obj)
From darcymason@gmail.com on April 12, 2010 21:37:03
Hi Pierre, Julien Lamy has apparently fixed this recursion error in a personal clone [1] -- just by adding a check for the private_creator tag in setitem. I'm working on merging this and the other changes in that clone with the mainline code. Once that is done, I'll push it up to the repository.
[1] https://code.google.com/r/lamy-pydicom/source/detail?r=f54d9aa6b3
Status: Started
From darcymason@gmail.com on April 13, 2010 18:42:24
This issue was closed by revision 14894de0a4 .
Status: Fixed
From pierre.raybaut on April 12, 2010 07:35:36
This error has been introduced between v0.9.3 and v0.9.4, with the changes made in the getitem and setitem methods of the Dataset dictionary object.
When I'm opening all my DICOM files and if I'm printing out their contents, I get a recursion error -- see the simple test attached.
I've replaced line 255 (dataset.py) by the following:
dict.setitem(self, tag, DataElement_from_raw(data_elem))
but I really didn't have the time to look further -- it could be a nonsense. However, it's quite clear that when you assign the value with 'self[tag] = value', you will call the method setitem leading to an infinite loop in this case.
Attachment: dicom_bug.txt
Original issue: http://code.google.com/p/pydicom/issues/detail?id=84