question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Malformed values of Content Label attribute

See original GitHub issue

The Content Label attribute has Value Representation CS, which is restricted to [A-Z_0-9] characters. This is currently implemented incorrectly in highdicom. In addition, pydicom doesn’t complain if the value is not valid. Therefore, we will need to perform additional checks to ensure the values are valid.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hackermdcommented, Oct 25, 2021

Ideally, pydicom would assert the value representation when the value is set for a given data element. Maybe a discussion worth having the pydicom developers.

I think we’ve been down this path before and they are not keen on this idea (huge backwards incompatibility issues, although I would argue producing invalid files is worse…). However, if the global configuration parameter pydicom.config.enforce_valid_values is True, then pydicom does have the behaviour you describe. Unfortunately, there are not checks for every value representation, and specifically there does not appear to be a check for CS. (I personally added the checks for DS earlier this year, for example).

Yeah…I am not a fan of the global configuration and would much rather prefer an enforce_valid_values parameter for the constructor of the Dataset. It may be time to restart that conversation.

If we could add support for the remaining VRs to pydicom that would probably save us a lot of checks in highdicom.

0reactions
CPBridgecommented, Oct 25, 2021

Ideally, pydicom would assert the value representation when the value is set for a given data element. Maybe a discussion worth having the pydicom developers.

I think we’ve been down this path before and they are not keen on this idea (huge backwards incompatibility issues, although I would argue producing invalid files is worse…). However, if the global configuration parameter pydicom.config.enforce_valid_values is True, then pydicom does have the behaviour you describe. Unfortunately, there are not checks for every value representation, and specifically there does not appear to be a check for CS. (I personally added the checks for DS earlier this year, for example).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Malformed markup: Attribute "" appears more than once in ...
this error is most likely due to an unclosed attribute and as a result it generated a problem in the whole html template....
Read more >
email - Malformed HTML content - Stack Overflow
Remove all 3D on all of your attributes (style="" role="" ..) this is wrong style=3D"..." this is good style="..." – user8556290.
Read more >
It's a Malformed World - Coding Horror
The attempt to get the world to switch to XML, including quotes around attribute values and slashes in empty tags and namespaces all...
Read more >
Error Explanations for The W3C Markup Validation Service
This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value...
Read more >
The HTML Meter element - HTML: HyperText Markup Language
If unspecified or malformed, the value is 0 . If specified, but not within the range given by the min attribute and max...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found