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.

E: Implementation Class UID is an invalid UID

See original GitHub issue

Description

Trying to perform a C-Echo on a PACS server and this error returns ValueError: Implementation Class UID is an invalid UID

Expected behaviour

What you expected to happen, (including references to the DICOM standard is appreciated).

Is should receive the dicom echo back. I believe that the Implementation Class is Valid as it meets the criteria here : http://dicom.nema.org/medical/dicom/2016d/output/chtml/part07/sect_D.3.3.2.html https://www.medicalconnections.co.uk/kb/ImplementationUID-And-ImplementationName/

I note that this works successfully in for the dcm4che dicom java toolkit but not for python pydicom/pynetdicom toolkit

Actual behaviour

What actually happened. If an exception occurred please post the full traceback.

I can see that the server returns the C-Echo but the python raises a value error

This the the returned UID that is raised as invalid: Implementation UID: “1.2.124.113532.3320”

Exception in thread Thread-8: Traceback (most recent call last): File “C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\lib\threading.py”, line 916, in _bootstrap_inner self.run() File “C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\lib\site-packages\pynetdicom3-0.9.0-py3.6.egg\pynetdicom3\dul.py”, line 245, in run if self._is_transport_event() and self._idle_timer is not None: File “C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\lib\site-packages\pynetdicom3-0.9.0-py3.6.egg\pynetdicom3\dul.py”, line 466, in _is_transport_event self._check_incoming_pdu() File “C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\lib\site-packages\pynetdicom3-0.9.0-py3.6.egg\pynetdicom3\dul.py”, line 369, in _check_incoming_pdu self.primitive = self.pdu.to_primitive() File “C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\lib\site-packages\pynetdicom3-0.9.0-py3.6.egg\pynetdicom3\pdu.py”, line 899, in to_primitive primitive.user_information = item.to_primitive() File “C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\lib\site-packages\pynetdicom3-0.9.0-py3.6.egg\pynetdicom3\pdu_items.py”, line 1085, in to_primitive primitive.append(item.to_primitive()) File “C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\lib\site-packages\pynetdicom3-0.9.0-py3.6.egg\pynetdicom3\pdu_items.py”, line 1778, in to_primitive primitive.implementation_class_uid = self.implementation_class_uid File “C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\lib\site-packages\pynetdicom3-0.9.0-py3.6.egg\pynetdicom3\pdu_primitives.py”, line 1153, in implementation_class_uid raise ValueError(“Implementation Class UID is an invalid UID”) ValueError: Implementation Class UID is an invalid UID

Steps to reproduce

How to reproduce the issue. Please include a minimum working code sample and the anonymised DICOM dataset (if relevant).

Snippet from the server

A 2018.11.21 13:01:39.179 (0x14c0) Calling Title: "QEDRP3 " A 2018.11.21 13:01:39.180 (0x14c0) Application Context: “1.2.840.10008.3.1.1.1” “Dicom Application Context Name” A 2018.11.21 13:01:39.180 (0x14c0) Presentation RQ Context ID: 1 A 2018.11.21 13:01:39.181 (0x14c0) Abstract Syntax Name: “1.2.840.10008.1.1” “Verification” A 2018.11.21 13:01:39.181 (0x14c0) Transfer Syntax Name: “1.2.840.10008.1.2” “Little Endian” A 2018.11.21 13:01:39.181 (0x14c0) Transfer Syntax Name: “1.2.840.10008.1.2.1” “Little Endian Explicit” A 2018.11.21 13:01:39.181 (0x14c0) Transfer Syntax Name: “1.2.840.10008.1.2.2” “Big Endian Explicit” A 2018.11.21 13:01:39.182 (0x14c0) User Information Structure: A 2018.11.21 13:01:39.182 (0x14c0) Maximum length: 16382 A 2018.11.21 13:01:39.182 (0x14c0) Implementation UID: “1.2.826.0.1.3680043.9.3811.0.9.1” A 2018.11.21 13:01:39.183 (0x14c0) Implementation Version Name: “PYNETDICOM3_091” A 2018.11.21 13:01:39.205 (0x14c0) Printout of response association. A 2018.11.21 13:01:39.205 (0x14c0) Protocol Version: “1” A 2018.11.21 13:01:39.206 (0x14c0) Called Title: "ANY-SCP " A 2018.11.21 13:01:39.206 (0x14c0) Calling Title: "QEDRP3 " A 2018.11.21 13:01:39.206 (0x14c0) Application Context: “1.2.840.10008.3.1.1.1” “Dicom Application Context Name” A 2018.11.21 13:01:39.210 (0x14c0) Presentation AC Context ID: 1 A 2018.11.21 13:01:39.210 (0x14c0) Result: 0 “Acceptance” A 2018.11.21 13:01:39.210 (0x14c0) Transfer Syntax Name: “1.2.840.10008.1.2” “Little Endian” A 2018.11.21 13:01:39.210 (0x14c0) User Information Structure: A 2018.11.21 13:01:39.211 (0x14c0) Maximum length: 100000 A 2018.11.21 13:01:39.211 (0x14c0) Implementation UID: “1.2.124.113532.3320” A 2018.11.21 13:01:39.211 (0x14c0) Implementation Version Name: “BROKER992.0” E 2018.11.21 13:03:28.818 (0x14c0) dicom_accepter_class::main: error occured while receiving dicom object

Your environment

Please run the following and paste the output.

$ python -c "import platform; print(platform.platform())"
$ python -c "import sys; print('Python', sys.version)"
$ python -c "import pydicom; print('pydicom', pydicom.__version__)"
$ python -c "import pynetdicom3; print('pynetdicom3', pynetdicom3.__version__)"


Windows-7-6.1.7601-SP1
Python 3.6.6. !Anaconda custom (64-bit)|,<default, Jun 28 2018, 11:27:44> [MSC v. 1900 64 bit <AMD64>]
pydicom 1.3.0.dev0
pynetdicom3 0.9.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:20 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
scaramallioncommented, Nov 26, 2018

Ok, that’s great, I’ll close the issue.

Thanks for your help.

1reaction
scaramallioncommented, Nov 23, 2018

So the Implementation Class UID section is:

52 00 00 14 31 2e 32 2e 31 32 34 2e 31 31 33 35 33 32 2e 33 33 32 30 00

Item type: 0x52 Reserved: 0x00 Item length: 0x00 0x14 (20) Implementation class UID: everything else

It looks like the UID’s trailing padding character 0x00 isn’t being removed correctly by pynetdicom.

Read more comments on GitHub >

github_iconTop Results From Across the Web

invalid implementation uid? - Google Groups
I installed a pacs system that uses the following implementation class uid #: 65.112.112.68.73.67.79.77. Now for most dicom transfers I have
Read more >
DICOM conformance statement template - Philips
UID. Other. Verification SOP Class. 1.2.840.10008.1.1 ... Implementation Identifying Information . ... 6 - invalid-PDU-parameter.
Read more >
dicom conformance statement - IBM
electronic medical record through the application of Internet standards and ... Make sure to compare the SOP Class UID itself, not the description....
Read more >
7 Message Exchange - DICOM Standard
Invalid SOP Instance (0117H) - Indicates that the SOP Instance UID specified implied a violation of the UID construction rules. Mistyped argument (0212H)...
Read more >
DICOM Conformance Statement - Dcm4che
DICOM Implementation Class and Version for dcm4che Storage Server AE ... UID. Name List UID List. Presentation. 1.1.1. Storage Services e.
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