OpenSTEF / openstef-dbc

Provides (company specific) database connector for the OpenSTEF package
Mozilla Public License 2.0
1 stars 7 forks source link

_get_nearest_weather_location uses a hardcoded "NL" as country code when fetching MySQL data #132

Closed cayetanot-pierre-olivier-RTEi closed 3 months ago

cayetanot-pierre-olivier-RTEi commented 5 months ago

I have ran into this issue when trying to use the main weather fetching function ( .get_weather_data). The .get_weather_data function only works when using weather forecast locations with the country code NL in the MySQL db.

Issue in function: https://github.com/OpenSTEF/openstef-dbc/blob/1cf918957efeb857340913e55fd1b1df086dab69/openstef_dbc/services/weather.py#L53

Exact line: https://github.com/OpenSTEF/openstef-dbc/blob/1cf918957efeb857340913e55fd1b1df086dab69/openstef_dbc/services/weather.py#L72

This issue leads to unavailable data when using the main weather fetching functions with weather fetching locations outside of the Netherlands.