Open daje0601 opened 2 weeks ago
Running main script!
Sending start message
Notification mail sent successfully.
Error:
Traceback (most recent call last):
File "/Users/gangdasol/Documents/k-trains/reserve.py", line 93, in get_trains
trains = ktrains.search_train(dep, arr, date, time, available_only=False)
File "/Users/gangdasol/Documents/k-trains/ktrains/srt/srt.py", line 228, in search_train
parser = SRTResponseData(r.text)
File "/Users/.../Documents/k-trains/ktrains/srt/response_data.py", line 19, in __init__
self._parse()
File "/Users/.../Documents/k-trains/ktrains/srt/response_data.py", line 28, in _parse
self._status = self._json["resultMap"][0]
KeyError: 'resultMap'
Error occurred
Sending error message
Notification mail sent successfully.
The problem is probably in the process of successfully making the booking, getting the data from the API, and parsing it. Is it because the API specification is different? or Should I be checking other things?. I did a customisation to add the recently added SRT station.
Hi @daje0601 ! Thanks for reporting. The first message is probably due to the bot making too many requests (recently Korail + SRT updated their systems), so I guess we should update this part so that the block is not triggered.
About the second: my guess is that we should update the code to use the update SRT API code: https://github.com/ryanking13/SRT
I've only been running for about 5 minutes and I got this error. I'm not sure if I can leave it alone or if I need to run it again, what should I do?
Also, I don't want these errors to occur, so where should I fix them?