alfonsrv/impf-botpy

Exception bei verfuegbarem Termin

Closed this issue · 6 comments

Hallo,

beim Versuch, einen freien Impftermin ueber Telegram zu buchen, reagierte der Bot (Version 0.43b) mit einer Exception der Form:

impf-botpy | 2021-05-28 20:53:44,382 - [INFO] impf.alert.alert.py:41 Read APPOINTMENT_SLOT Code from Telegram: 2
impf-botpy | 2021-05-28 20:53:44,382 - [WARNING] impf.browser.browser.py:298 xxxxx: Received Appointment indicator from backend: 2 - booking now...
impf-botpy | 2021-05-28 20:53:44,383 - [INFO] impf.api.api.py:215 API: Booking appointment for xxxxx
impf-botpy | 2021-05-28 20:53:44,531 - [ERROR] impf.browser.browser.py:276 xxxxx: Unexpected exception occurred trying to book appointments remotely!
impf-botpy | Traceback (most recent call last):
impf-botpy | File "/app/impf/browser.py", line 274, in alert_appointment
impf-botpy | self.remote_booking()
impf-botpy | File "/app/impf/browser.py", line 299, in remote_booking
impf-botpy | if api.book_appointment(appointments, int(_code)):
impf-botpy | File "/app/impf/decorators.py", line 119, in func
impf-botpy | x = f(self, *args, **kwargs)
impf-botpy | File "/app/impf/api.py", line 234, in book_appointment
impf-botpy | r = self.xs.post(f'{self.host}/rest/buchung', json=data)
impf-botpy | File "/app/impf/decorators.py", line 107, in api_response
impf-botpy | x = self._handle_error(response.status_code, response.json())
impf-botpy | File "/app/impf/api.py", line 54, in _handle_error
impf-botpy | if 'Anfragelimit erreicht' in message.get('error'):
impf-botpy | TypeError: argument of type 'NoneType' is not iterable
impf-botpy | 2021-05-28 20:53:44,532 - [INFO] impf.alert.alert.py:63 Sending alert "Appointment could not be booked – please continue manually!"
impf-botpy | 2021-05-28 21:03:48,773 - [WARNING] impf.browser.decorators.py:81 xxxxx: Exiting...

Davor gab es bereits eine Exception bei der Alarmierung:

2021-05-28 20:52:27,941 - [ERROR] impf.alert.alert.py:56 An unexpected exception occurred while reading alerts! Please report this issue to https://github.com/alfonsrv/impf-botpy/issues
impf-botpy | Traceback (most recent call last):
impf-botpy | File "/app/impf/alert.py", line 54, in read_backend
impf-botpy | code = _read_backend(telegram_read, match_func) or code
impf-botpy | File "/app/impf/alert.py", line 39, in _read_backend
impf-botpy | code = backend_func(match_func)
impf-botpy | File "/app/impf/alert.py", line 124, in telegram_read
impf-botpy | if match_func(_message.get('text')) and time() - _message.get('date') <= 120:
impf-botpy | File "/app/impf/alert.py", line 32, in appointment_slot
impf-botpy | m = APPT_RE.search(string.strip())
impf-botpy | AttributeError: 'NoneType' object has no attribute 'strip'

Beim Versuch, den Termin dann manuell zu buchen, wurde er zwar noch angezeigt, konnte aber nicht mehr gebucht werden, obwohl die 10 Minuten noch nicht abgelaufen waren.

Als Feedback.

Regards,

Moin, bitte einfach die aktuelle Version runterladen. Bzgl. der manuellen nicht mehr tätigbaren Buchung – das leider bei ImpfterminService manchmal so, dass sie die Terminen mehreren Leuten gleichzeitig anzeigen. Kann man nichts machen.

Cheers fürs Issue & BR,
Alfons

Danke fuer die schnelle Rueckmeldung. Die Version ist die aktuelle 0.43b.

Sorry, Sorry, im Container war noch die 0.43. Ich will nichts gesagt haben :)

Hm ok; schaue ich mir mal an! Sag dann Bescheid wie's aussieht

Danke fuer Deine Arbeit.

Bitte Issue nächstes Mal eigenständig schließen.