You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
login error and after that next issues with getStudents and unidecode.
(I guess) this issue occurs in this scenario:
HA with edupage integration is down for some time
login session is time-outed
login method throws "list index out of range"
get_students() throws NotLoggedInException
unidecode throws error because student_name = unknown
This error originated from a custom integration.
Logger: custom_components.homeassistantedupage.homeassistant_edupage
Source: custom_components/homeassistantedupage/homeassistant_edupage.py:45
integration: homeassistantedupage (documentation, issues)
First occurred: 8:07:46 AM (9 occurrences)
Last logged: 8:25:10 AM
EDUPAGE unexpected login error: list index out of range
This error originated from a custom integration.
Logger: custom_components.homeassistant_edupage
Source: custom_components/homeassistantedupage/init.py:133
integration: homeassistant_edupage
First occurred: 8:11:03 AM (6 occurrences)
Last logged: 8:25:12 AM
INIT Failed to fetch timetable: EDUPAGE error updating get_students() data from API:
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:365
integration: Sensor (documentation, issues)
First occurred: 8:22:04 AM (2 occurrences)
Last logged: 8:25:12 AM
Error while setting up homeassistantedupage platform for sensor
Traceback (most recent call last):
File "/workspaces/core/homeassistant/helpers/entity_platform.py", line 365, in _async_setup_platform
await asyncio.shield(awaitable)
File "/workspaces/core/config/custom_components/homeassistantedupage/sensor.py", line 45, in async_setup_entry
notify = EduPageNotificationSensor(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/core/config/custom_components/homeassistantedupage/sensor.py", line 121, in init
self.student_name = unidecode(student_name).replace(' ', '').lower()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/ha-venv/lib/python3.12/site-packages/unidecode/init.py", line 60, in unidecode_expect_ascii
bytestring = string.encode('ASCII')
^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'encode'
Screenshots
The text was updated successfully, but these errors were encountered:
Without taking a deeper look I'm pretty sure that this is a problem because of the saved session (which is needed to not handle 2FA). I think the session is timed out and needs a re-login. For users without 2FA it could be a solution to catch that specific error and continue with "normal" login.
Sounds like the whole login process has to be refactored :/
Describe the bug
login error and after that next issues with getStudents and unidecode.
(I guess) this issue occurs in this scenario:
This error originated from a custom integration.
Logger: custom_components.homeassistantedupage.homeassistant_edupage
Source: custom_components/homeassistantedupage/homeassistant_edupage.py:45
integration: homeassistantedupage (documentation, issues)
First occurred: 8:07:46 AM (9 occurrences)
Last logged: 8:25:10 AM
EDUPAGE unexpected login error: list index out of range
This error originated from a custom integration.
Logger: custom_components.homeassistant_edupage
Source: custom_components/homeassistantedupage/init.py:133
integration: homeassistant_edupage
First occurred: 8:11:03 AM (6 occurrences)
Last logged: 8:25:12 AM
INIT Failed to fetch timetable: EDUPAGE error updating get_students() data from API:
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:365
integration: Sensor (documentation, issues)
First occurred: 8:22:04 AM (2 occurrences)
Last logged: 8:25:12 AM
Error while setting up homeassistantedupage platform for sensor
Traceback (most recent call last):
File "/workspaces/core/homeassistant/helpers/entity_platform.py", line 365, in _async_setup_platform
await asyncio.shield(awaitable)
File "/workspaces/core/config/custom_components/homeassistantedupage/sensor.py", line 45, in async_setup_entry
notify = EduPageNotificationSensor(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/core/config/custom_components/homeassistantedupage/sensor.py", line 121, in init
self.student_name = unidecode(student_name).replace(' ', '').lower()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/ha-venv/lib/python3.12/site-packages/unidecode/init.py", line 60, in unidecode_expect_ascii
bytestring = string.encode('ASCII')
^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'encode'
Screenshots

The text was updated successfully, but these errors were encountered: