Open chrjoedal opened 2 months ago
I have the same error for https://bibliotek.kk.dk/adgangsplatformen/login?destination=ding_frontpage
homeassistant | 2024-06-12 21:47:25.356 ERROR (SyncWorker_2) [custom_components.bibliotek_dk.library_api] HTTP Error while fetching https://bibliotek.kk.dk/adgangsplatformen/login?destination=ding_frontpage: 404 Client Error: Not Found for url: https://bibliotek.kk.dk/adgangsplatformen/login?destination=ding_frontpage
homeassistant | 2024-06-12 21:47:25.356 ERROR (SyncWorker_2) [custom_components.bibliotek_dk.library_api] Error processing the <form> tag and subtags (https://bibliotek.kk.dk/adgangsplatformen/login?destination=ding_frontpage). Error: ('NoneType' object has no attribute 'find')
homeassistant | 2024-06-12 21:47:25.356 ERROR (SyncWorker_2) [custom_components.bibliotek_dk.library_api] Error in finding (logget ind) in the title of the page. Error: ('NoneType' object has no attribute 'title')
homeassistant | 2024-06-12 21:47:25.357 ERROR (MainThread) [custom_components.bibliotek_dk.sensor] Unexpected error fetching sensor data
homeassistant | Traceback (most recent call last):
homeassistant | File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh
homeassistant | self.data = await self._async_update_data()
homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant | File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 268, in _async_update_data
homeassistant | return await self.update_method()
homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant | File "/config/custom_components/bibliotek_dk/sensor.py", line 58, in async_update_data
homeassistant | await hass.async_add_executor_job(myLibrary.update)
homeassistant | File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
homeassistant | result = self.fn(*self.args, **self.kwargs)
homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant | File "/config/custom_components/bibliotek_dk/library_api.py", line 89, in update
homeassistant | if self.login():
homeassistant | ^^^^^^^^^^^^
homeassistant | File "/config/custom_components/bibliotek_dk/library_api.py", line 363, in login
homeassistant | self.loggedIn = self._titleInSoup(soup, LOGGED_IN)
homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant | File "/config/custom_components/bibliotek_dk/library_api.py", line 168, in _titleInSoup
homeassistant | return result
homeassistant | ^^^^^^
homeassistant | UnboundLocalError: cannot access local variable 'result' where it is not associated with a value
Similar/same problem for Allerød:
2024-07-02 14:45:54.201 ERROR (SyncWorker_4) [custom_components.bibliotek_dk.library_api] HTTP Error while fetching https://www.bibliotek.alleroed.dk/adgangsplatformen/login?destination=ding_frontpage: 404 Client Error: Not Found for url: https://www.bibliotek.alleroed.dk/adgangsplatformen/login?destination=ding_frontpage 2024-07-02 14:45:54.201 ERROR (SyncWorker_4) [custom_components.bibliotek_dk.library_api] Error processing the
Same error for Herlev on https://www.herlevbibliotek.dk
The new web page for Herlev bibliotek look similar to ones mentioned above.
Hi,
Aalborg blibliotek has got a new webpage. I seems like the integration cannot handle that.
It has been working for me for a long time, but then it suddenly threw errors all the time, and did not update sensors.
I removed it, and tried to re-add it, but could not, due to unexpected error. In the log, I see following erros:
1
This error originated from a custom integration.
Logger: custom_components.bibliotek_dk.library_api Source: custom_components/bibliotek_dk/library_api.py:139 integration: Bibliotek (documentation, issues) First occurred: May 29, 2024 at 18:01:29 (4 occurrences) Last logged: 20:21:33
HTTP Error while fetching https://www.aalborgbibliotekerne.dk/adgangsplatformen/login?destination=ding_frontpage: 404 Client Error: Not Found for url: https://www.aalborgbibliotekerne.dk/adgangsplatformen/login?destination=ding_frontpage
2
This error originated from a custom integration.
Logger: custom_components.bibliotek_dk.library_api Source: custom_components/bibliotek_dk/library_api.py:356 integration: Bibliotek (documentation, issues) First occurred: May 29, 2024 at 18:01:29 (4 occurrences) Last logged: 20:21:33
Error processing the