Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kalender virker kun for en enkelt elev #26

Closed
Kubling1 opened this issue Nov 14, 2022 · 14 comments · Fixed by #27
Closed

Kalender virker kun for en enkelt elev #26

Kubling1 opened this issue Nov 14, 2022 · 14 comments · Fixed by #27
Assignees

Comments

@Kubling1
Copy link

Hej. Har en masse fejl:

Logger: aiohttp.server
Source: custom_components/aula/calendar.py:103
Integration: Aula (documentation, issues)
First occurred: 15.29.14 (5 occurrences)
Last logged: 15.31.54

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/calendar/init.py", line 264, in get
calendar_event_list = await entity.async_get_events(
File "/config/custom_components/aula/calendar.py", line 67, in async_get_events
return await self.data.async_get_events(hass, start_date, end_date)
File "/config/custom_components/aula/calendar.py", line 113, in async_get_events
events = self.parseCalendarData()
File "/config/custom_components/aula/calendar.py", line 103, in parseCalendarData
teacher = c['lesson']['participants'][0]['teacherInitials']
IndexError: list index out of range

Logger: homeassistant.helpers.entity
Source: custom_components/aula/calendar.py:103
Integration: Aula (documentation, issues)
First occurred: 15.29.29 (3 occurrences)
Last logged: 15.31.29

Update for calendar.skoleskema_saga_kristine_sogaard fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 527, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 722, in async_device_update
raise exc
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/aula/calendar.py", line 63, in update
self.data.update()
File "/usr/src/homeassistant/homeassistant/util/init.py", line 192, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/aula/calendar.py", line 119, in update
self.parseCalendarData(self)
File "/config/custom_components/aula/calendar.py", line 103, in parseCalendarData
teacher = c['lesson']['participants'][0]['teacherInitials']
IndexError: list index out of range

Logger: homeassistant.components.sensor
Source: custom_components/aula/client.py:116
Integration: Sensor (documentation, issues)
First occurred: 15.28.37 (1 occurrences)
Last logged: 15.28.37

Error while setting up aula platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/aula/sensor.py", line 55, in async_setup_entry
await hass.async_add_executor_job(client.update_data)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/aula/client.py", line 126, in update_data
ugeplan(thisweek,"this")
File "/config/custom_components/aula/client.py", line 116, in ugeplan
for person in ugeplaner.json()["personer"]:
KeyError: 'personer'

Logger: custom_components.aula.sensor
Source: custom_components/aula/client.py:116
Integration: Aula (documentation, issues)
First occurred: 15.28.31 (1 occurrences)
Last logged: 15.28.31

Unexpected error fetching sensor data: 'personer'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data
return await self.update_method()
File "/config/custom_components/aula/sensor.py", line 40, in async_update_data
await hass.async_add_executor_job(client.update_data)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/aula/client.py", line 126, in update_data
ugeplan(thisweek,"this")
File "/config/custom_components/aula/client.py", line 116, in ugeplan
for person in ugeplaner.json()["personer"]:
KeyError: 'personer'

Håber du kan bruge noget af det

@scaarup
Copy link
Owner

scaarup commented Nov 15, 2022

Hej @Kubling1, tak for information.

Kan det passe, at du har ugenoter via Meebook?

@Kubling1
Copy link
Author

Kubling1 commented Nov 15, 2022 via email

@Kubling1
Copy link
Author

Kubling1 commented Nov 15, 2022 via email

@scaarup
Copy link
Owner

scaarup commented Nov 15, 2022

Det skal nok passe. tir. 15. nov. 2022 08.58 skrev Søren Christian Aarup < @.>:

Hej @Kubling1 https://github.com/Kubling1, tak for information. Kan det passe, at du har ugenoter via Meebook? — Reply to this email directly, view it on GitHub <#26 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXGL22AKBZIRTHVU45N4UQ3WIM7DFANCNFSM6AAAAAAR74T4XY . You are receiving this because you were mentioned.Message ID: @.
>

Okay, så arbejdes der allerede på en løsning. Der er oprettet issue #17 til dette.

@scaarup scaarup changed the title Integration Kalender virker kun for en enkelt elev Nov 15, 2022
@scaarup scaarup self-assigned this Nov 15, 2022
@scaarup
Copy link
Owner

scaarup commented Nov 15, 2022

Det sjove er at jeg godt kan få vist skema for den ene person, men ikke den 2. 3.petson har ikke noget skema pt. tir. 15. nov. 2022 08.58 skrev Søren Christian Aarup < @.>:

Hej @Kubling1 https://github.com/Kubling1, tak for information. Kan det passe, at du har ugenoter via Meebook? — Reply to this email directly, view it on GitHub <#26 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXGL22AKBZIRTHVU45N4UQ3WIM7DFANCNFSM6AAAAAAR74T4XY . You are receiving this because you were mentioned.Message ID: @.
>

Jeg kan se på din log ovenover, at der mangler initialer på en lærer. Jeg prøver lige at lave lidt håndtering af den fejl og vender tilbage når jeg har en ny version klar.

@scaarup scaarup linked a pull request Nov 15, 2022 that will close this issue
@scaarup scaarup linked a pull request Nov 15, 2022 that will close this issue
@scaarup
Copy link
Owner

scaarup commented Nov 15, 2022

@Kubling1 der er en release ude v0.1.16. Men den er i "prerelease" - dvs du skal enable beta versions i HACS, for at få den. Vil du lige teste engang?
Tak.

@Kubling1
Copy link
Author

Kubling1 commented Nov 15, 2022 via email

@scaarup
Copy link
Owner

scaarup commented Nov 15, 2022

Du skal have følgende i din configuration.yaml:

logger:
  default: info
  logs:
    custom_components.aula: debug

@Kubling1
Copy link
Author

Kubling1 commented Nov 15, 2022 via email

@scaarup
Copy link
Owner

scaarup commented Nov 15, 2022

Det var en del :) Men ikke en eneste debug loglinje. Er du sikker på, at du har fået slået det til?

@Kubling1
Copy link
Author

Kubling1 commented Nov 15, 2022 via email

@Kubling1
Copy link
Author

Kubling1 commented Nov 15, 2022 via email

@Kubling1
Copy link
Author

Kubling1 commented Nov 15, 2022 via email

@scaarup
Copy link
Owner

scaarup commented Nov 15, 2022

Hejsa. Det er perfekt :) Vi lukker det her issue, så er der andet, der driller, opretter du bare et andet issue.

@scaarup scaarup closed this as completed Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants