Ingenjorsarbete-For-Klimatet / ifk-smhi

SMHI climate data client.
https://ingenjorsarbeteforklimatet.se/ifk-smhi/
MIT License
9 stars 1 forks source link

index error when using interpolate with get_data #89

Closed kjohan19 closed 10 months ago

kjohan19 commented 10 months ago

I was playing around with the smhi client and tried to use interpolate. I got a dict cannot have index error and took a closer look at the code. It seems like there is a small bug with the order in which the getdata values are assigned. It can be found in line 169 in smhi.py and looks like this: `, tmpdata = self.get_data(parameter, nearby_station[0])` I think you only need to switch places on the underscore and tmpdata and it will do as intended.

Thank you for providing this client!

Br, Karl

docNord commented 10 months ago

Thank you for noting. I will try to get a bugfix in tonight.