Problem with INVALID_KEYWORD_BEHAVIOR #1804
Replies: 3 comments
-
The You might try
But I'm not certain that will work. As the documentation says, it still may warn due to encoding issues. |
Beta Was this translation helpful? Give feedback.
-
Thanks, that addition does suppress the warning messages in this case. |
Beta Was this translation helpful? Give feedback.
-
I also added the private elements to the dictionary which removed 99% of the warnings. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am using V2.3.1 to parse files with a private tag sequence that contains invalid tags so I get warnings like this:
/usr/lib/python3/dist-packages/pydicom/valuerep.py:290: UserWarning: Invalid value for VR UI: '\x03'. Please see <https://dicom.nema.org/medical/dicom/current/output/html/part05.html#table_6.2-1> for allowed values for each VR.
I can still process the invalid tags so I just want to suppress the messages. I tried using
pydicom.config.INVALID_KEYWORD_BEHAVIOR = 'IGNORE'
in my program but the warnings are still printed.I tried the same thing in repl and the warnings are only suppressed if the config is changed after loading the dataset.
Any suggestions on how to fix this?
Beta Was this translation helpful? Give feedback.
All reactions