Closed suever closed 9 years ago
From darcymason@gmail.com on November 03, 2011 18:20:01
I was able to reproduce the same sequence using your code. No idea how that could happen, and as you noted it is particular to accessing a certain tag number (or any private tag?). Will have to try to trace through the code and see what might be happening.
Status: Accepted
From gunnar.s...@gmail.com on April 27, 2012 17:07:37
Patch attached. Use of logging.debug() instead of logger.debug() in dicom/dataset.py:525 implicitly adds a handler to the root logger.
Attachment: dataset.py.patch
From darcymason@gmail.com on April 28, 2012 03:17:13
Nice find. Will apply to 09x series clone and to main branch heading for pydicom 1.0.
From darcymason@gmail.com on April 28, 2012 03:28:15
This issue was closed by revision 774b7a55db33 .
Status: Fixed
From gunnar.s...@gmail.com on October 28, 2011 17:58:32
What steps will reproduce the problem? run this code:
import dicom, logging mylogger = logging.getLogger('mylogger') mylogger.addHandler(logging.StreamHandler())
dcm = dicom.read_file('1.dcm') mylogger.error('once')
dcm.PatientsName dcm[0x0010, 0x0010] mylogger.error('once again')
dcm[0x0019, 0x10e0] mylogger.error('twice') What is the expected output? What do you see instead? once once again twice ERROR:mylogger:twice
All log messages should appear exactly once, but after accessing a certain field by tag number, subsequent log messages appear twice. Note the different formatting of the last log message. It seems as if a second handler has gotten attached to "mylogger". What version of the product are you using? 0.9.5 on Ubuntu 11.04 (GNU/Linux 2.6.38-11-generic x86_64) Please provide any additional information below. Here is a trace:
Attachment: 1.dcm
Original issue: http://code.google.com/p/pydicom/issues/detail?id=107