Skip to content

Conversation

@f-laurens
Copy link
Contributor

@f-laurens f-laurens commented Apr 22, 2025

Avoid nabweatherd crash because of missing weather classes (new Météo France classes?):

see: https://www.tagtagtag.fr/forum/showthread.php?tid=528&pid=3111#pid3111 :

2025-04-22 13:00:28,820 [WARNING] nabweatherd: unexpected weather class: Averses faibles
2025-04-22 13:00:28,822 [WARNING] nabweatherd: unexpected weather class: Averses faibles
2025-04-22 13:00:28,864 [CRITICAL] nabweatherd: Unhandled error: Traceback (most recent call last):
  File "/home/pi/pynab/nabcommon/nabservice.py", line 202, in main
    service.run()
  File "/home/pi/pynab/nabcommon/nabservice.py", line 133, in run
    raise ex
  File "/home/pi/pynab/nabcommon/nabservice.py", line 329, in service_loop
    await self.perform(
  File "/home/pi/pynab/nabweatherd/nabweatherd.py", line 240, in perform
    await NabInfoService.perform(self, expiration, args, config)
  File "/home/pi/pynab/nabcommon/nabservice.py", line 468, in perform
    info_animation = self.get_animation(info_data)
  File "/home/pi/pynab/nabweatherd/nabweatherd.py", line 493, in get_animation
    (weather_class, info_animation) = NabWeatherd.WEATHER_CLASSES[
KeyError: None

see: https://www.tagtagtag.fr/forum/showthread.php?tid=528&pid=3113#pid3113 :

2025-04-24 20:35:47,376 [WARNING] nabweatherd: unexpected weather class: Ciel clair
2025-04-24 20:35:47,658 [WARNING] nabweatherd: unexpected weather class: Ciel clair
2025-04-24 20:35:47,683 [CRITICAL] nabweatherd: Unhandled error: Traceback (most recent call last):
  File "/opt/pynab/nabcommon/nabservice.py", line 202, in main
    service.run()
  File "/opt/pynab/nabcommon/nabservice.py", line 133, in run
    raise ex
  File "/opt/pynab/nabcommon/nabservice.py", line 332, in service_loop
    config,
  File "/opt/pynab/nabweatherd/nabweatherd.py", line 265, in perform
    await self._do_perform_additional(config, weather_forecast)
  File "/opt/pynab/nabweatherd/nabweatherd.py", line 578, in _do_perform_additional
    await self.perform_additional(expiration, type, info_data, config)
  File "/opt/pynab/nabweatherd/nabweatherd.py", line 542, in perform_additional
    info_data["tomorrow_forecast_weather_class"]
KeyError: None

@f-laurens f-laurens changed the title Add missing 'Averses faibles' weather class Add missing 'Averses faibles' and 'Ciel clair' weather classes Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant