meteostat / meteostat-python

Access and analyze historical weather and climate data with Python.
https://dev.meteostat.net/python/
MIT License
439 stars 60 forks source link

Error loading Hourly data with Point #101

Closed Diederik98 closed 2 years ago

Diederik98 commented 2 years ago

With version 1.6.2 I get the following error and it origins from It origins from meteostat/core/loader.py:load_handler

URL can't contain control characters. '/v2/hourly/YEAR/<meteostat.interface.point.Point object at 0x2b037dcd0>.csv.gz' (found at least ' ')
gutzbenj commented 2 years ago

Hey there,

I don't know if this is directly related but there seems to be a bug here

https://github.com/meteostat/meteostat-python/blob/1f332834e80276259d7143d2ec35dfcce7053c94/meteostat/utilities/endpoint.py#L28

where it probably should be

if granularity == Granularity.HOURLY and year: 
clampr commented 2 years ago

Thank you @gutzbenj for spotting the bug! I'll publish a new release in a bit.

I'm not sure if this is causing your problem @Diederik98. Can you share your script?