From 77ffc4146b03d0417be3f53ad97dd0197dd2f763 Mon Sep 17 00:00:00 2001 From: Ace Date: Mon, 29 Jan 2024 00:32:12 +0100 Subject: [PATCH] fix minor bug This fixes a bug where using hourly weather forecast with imperial units would lead to the error: TypeError: list indices must be integers or slices, not str --- inkycal/modules/inkycal_weather.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inkycal/modules/inkycal_weather.py b/inkycal/modules/inkycal_weather.py index a14abc3..6ad2a03 100644 --- a/inkycal/modules/inkycal_weather.py +++ b/inkycal/modules/inkycal_weather.py @@ -434,7 +434,7 @@ class Weather(inkycal_module): if self.units == "metric": temp = f"{round(weather['main']['temp'], ndigits=dec_temp)}°C" else: - temp = f"{round(self.celsius_to_fahrenheit(weather['weather']['main']['temp']), ndigits=dec_temp)}°F" + temp = f"{round(self.celsius_to_fahrenheit(weather['main']['temp']), ndigits=dec_temp)}°F" icon = forecast["weather"][0]["icon"] fc_data['fc' + str(forecasts.index(forecast) + 1)] = {