pynetdicom: E: Implementation Class UID is an invalid UID
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
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (12 by maintainers)
Ok, that’s great, I’ll close the issue.
Thanks for your help.
So the Implementation Class UID section is:
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.
Hmm, that’s even weirder since the UID appears valid to me and the following works:
If I create a branch with additional debugging output do you feel comfortable downloading and running that so I can take a look at the raw response from the peer? It may be that there’s an issue with decoding the A-ASSOCIATE-AC PDU.
Bravo @scaramallion !!
E: The Implementation Class UID Notification’s ‘Implementation Class UID’ parameter value ‘1.2.124.113532.3320’ is not a valid UID
C-ECHO request status: 0x0000 This was Correct : (0000, 0900) Status