You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pynetdicom assumes that AffectedSOPClass is returned in a C-ECHO-RSP. However, it seems that at least mirth does not return AffectedSOPClass in its response, making pynetdicom unable to properly ping mirth, throwing the following trace:
File "pinger.py", line 38, in
st = assoc.VerificationSOPClass.SCU(1)
File "/usr/local/lib/python2.7/site-packages/netdicom/SOPclass.py", line 60, in SCU
ans, id = self.DIMSE.Receive(Wait=True)
File "/usr/local/lib/python2.7/site-packages/netdicom/DIMSEprovider.py", line 75, in Receive
return tmp.ToParams(), tmp.ID
File "/usr/local/lib/python2.7/site-packages/netdicom/DIMSEmessages.py", line 248, in ToParams
tmp.AffectedSOPClassUID = self.CommandSet[(0x0000,0x0002)]
File "/usr/local/lib/python2.7/site-packages/pydicom-0.9.9-py2.7.egg/dicom/dataset.py", line 277, in getitem
data_elem = dict.getitem(self, tag)
KeyError: (0000, 0002)
the quick fix is to change AffectedSOPClassUID to optional, in DIMSEmessages.py line 247:
if self.CommandSet.has_key((0x0000,0x0002)):
tmp.AffectedSOPClassUID = self.CommandSet[(0x0000,0x0002)]
I will file a bug with Mirth in parallel, but I believe pynetdicom should be more lenient.
The text was updated successfully, but these errors were encountered:
Looks like this is affecting more SOP classes and more keys like AffectedSOPInstanceUID. This had better be a more generic thing rather than just those classes.
Hi,
pynetdicom assumes that AffectedSOPClass is returned in a C-ECHO-RSP. However, it seems that at least mirth does not return AffectedSOPClass in its response, making pynetdicom unable to properly ping mirth, throwing the following trace:
File "pinger.py", line 38, in
st = assoc.VerificationSOPClass.SCU(1)
File "/usr/local/lib/python2.7/site-packages/netdicom/SOPclass.py", line 60, in SCU
ans, id = self.DIMSE.Receive(Wait=True)
File "/usr/local/lib/python2.7/site-packages/netdicom/DIMSEprovider.py", line 75, in Receive
return tmp.ToParams(), tmp.ID
File "/usr/local/lib/python2.7/site-packages/netdicom/DIMSEmessages.py", line 248, in ToParams
tmp.AffectedSOPClassUID = self.CommandSet[(0x0000,0x0002)]
File "/usr/local/lib/python2.7/site-packages/pydicom-0.9.9-py2.7.egg/dicom/dataset.py", line 277, in getitem
data_elem = dict.getitem(self, tag)
KeyError: (0000, 0002)
the quick fix is to change AffectedSOPClassUID to optional, in DIMSEmessages.py line 247:
I will file a bug with Mirth in parallel, but I believe pynetdicom should be more lenient.
The text was updated successfully, but these errors were encountered: