Hi, all
I am wonddering how the API works for the OpenLDBSVWS to get the historical departure and arrival time?
Below is my Python code, which I have hidden my TOKEN
if LDB_TOKEN == '':
raise Exception("Please configure your OpenLDBWS token in getDepartureBoardExample!")
history = HistoryPlugin()
client = Client(wsdl=WSDL, plugins=[history])
res = client.service.GetHistoricDepartureBoard(numRows=100, crs='EUS', historicDateTime = "2020-06-04", timeWindow = 100)
print("Trains at " + res.locationName)
print("===============================================================================")
services = res.trainServices.service
i = 0
while i < len(services):
t = services[i]
print(t.std + " to " + t.destination.location[0].locationName + " - " + t.etd)
i += 1
However, when I run the code, it comes an error message as below:
Fault Traceback (most recent call last)
<ipython-input-318-aa756cbca099> in <module>
----> 1 res = client.service.GetHistoricDepartureBoard(numRows=100, crs='EUS', historicDateTime = "2020-06-04", timeWindow = 100)
2
3 print("Trains at " + res.locationName)
4 print("===============================================================================")
5 services = res.trainServices.service
~\AppData\Local\Continuum\anaconda3\lib\site-packages\zeep\proxy.py in __call__(self, *args, **kwargs)
43 self._op_name,
44 args,
---> 45 kwargs,
46 )
47
~\AppData\Local\Continuum\anaconda3\lib\site-packages\zeep\wsdl\bindings\soap.py in send(self, client, options, operation, args, kwargs)
128 return response
129
--> 130 return self.process_reply(client, operation_obj, response)
131
132 def process_reply(self, client, operation, response):
~\AppData\Local\Continuum\anaconda3\lib\site-packages\zeep\wsdl\bindings\soap.py in process_reply(self, client, operation, response)
193 fault_node = doc.find("soap-env:Body/soap-env:Fault", namespaces=self.nsmap)
194 if response.status_code != 200 or fault_node is not None:
--> 195 return self.process_error(doc, operation)
196
197 result = operation.process_reply(doc)
~\AppData\Local\Continuum\anaconda3\lib\site-packages\zeep\wsdl\bindings\soap.py in process_error(self, doc, operation)
285 code=None,
286 actor=None,
--> 287 detail=etree_to_string(doc),
288 )
289
Fault: Unknown fault occured
Does anyone know how to solve the error. Any suggestion would be much apprecaited.
Regards
Wei