ClassicUPS icon indicating copy to clipboard operation
ClassicUPS copied to clipboard

KeyError: Shipment

Open flyboy1565 opened this issue 7 years ago • 0 comments

>>> t = ups.tracking_info('1Z12345E0205271688 ')
>>> t.in_transit

Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/ClassicUPS/ups.py", line 131, in in_transit in_transit = [x for x in self.shipment_activities File "/usr/local/lib/python2.7/dist-packages/ClassicUPS/ups.py", line 116, in shipment_activities ['Shipment']['Package']['Activity']) KeyError: 'Shipment'

Should handle if no shipment data is returned in the XML

flyboy1565 avatar Jan 02 '19 16:01 flyboy1565