Closed dpakprajul closed 3 months ago
Dear @dpakprajul ,
does the issue still exist? I can't reproduce it.
Hi @gutzbenj I am still having the same problem in my Working machine stating no meta file was found amongst the files at Webaddress: . I thought there might be the issue of the server that is not letting the request to proceed (since I am Notebook and the internet connection from Work). Don't know what is happening exactly.
I couldn't reproduce this problem in my personal Notebook but got this problem instead:
error | "conversion from str
to f64
failed in column 'height' for 519 out of 519 values: [\"30429 20110331\", \"70209 20240423\", … \"30401 20240424\"]"
Would you please give me a hint how to solve this problem?
This new issue should be fixed now! The problem with your workstation could actually be the SSL certificate. Can you confirm that you are using a custom SSL certificate?
Closing this for now.
Describe the Bug I wanted to get the data from wetterdienst Germany, but couldn't get the data. I need to send the temperature data, and the weather condition (rain, no rain, sunny) etc. to the client side from the backend. I am using django for this. I tried to get the data directly from https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate//10_minutes/air_temperature/recent/, but extracting zip, calculating the data and sending again to client takes longer than 5 seconds. Hence I wanted to implement this as a alternative.
To Reproduce
I wanted to integrate the German weather in my opensource project. I installed the package by pip install git+https://github.com/earthobservations/wetterdienst in a virtual environment.
I create a url which call the function for getting the weather data from the wetter dienst.
When I go to the url, for example, localhost//get-temperature-data/, this function is called:
It gives the error: MetaFileNotFoundError at /get-temperature-data/ No meta file was found amongst the files at https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate//10_minutes/air_temperature/recent/.
print(request) gives DwdObservationRequest(parameter=[(air_temperature/air_temperature)], resolution=10_minutes, period=[recent], start_date=None, end_date=None, humanize=True, format=long, si_units=True)
The error in the terminal,
Internal Server Error: /get-temperature-data/ Traceback (most recent call last): File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/data/projects/weather_try/my_weather/weather_app/views.py", line 14, in get_temperature_data stations = request.filter_by_station_id(station_id=("03404")) File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/provider/dwd/observation/api.py", line 501, in filter_by_station_id return super().filter_by_station_id( File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/core/timeseries/request.py", line 656, in filter_by_station_id df = self.all().df File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/core/timeseries/request.py", line 634, in all df = self._all() File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/provider/dwd/observation/api.py", line 564, in _all df = create_meta_index_for_climate_observations(dataset, self.resolution, period, self.settings) File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/provider/dwd/observation/metaindex.py", line 92, in create_meta_index_for_climate_observations meta_index = _create_meta_index_for_climate_observations(dataset, resolution, period, settings) File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/provider/dwd/observation/metaindex.py", line 148, in _create_meta_index_for_climate_observations meta_file = _find_meta_file(remote_files, url, ["beschreibung", "txt"]) File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/provider/dwd/observation/metaindex.py", line 172, in _find_meta_file raise MetaFileNotFoundError(f"No meta file was found amongst the files at {url}.") wetterdienst.exceptions.MetaFileNotFoundError: No meta file was found amongst the files at https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate//10_minutes/air_temperature/recent/. [10/Apr/2024 08:59:18] "GET /get-temperature-data/ HTTP/1.1" 500 102963 Not Found: /favicon.ico [10/Apr/2024 08:59:19] "GET /favicon.ico HTTP/1.1" 404 2264 Requesting data from DWD... DwdObservationRequest(parameter=[(air_temperature/air_temperature)], resolution=10_minutes, period=[recent], start_date=None, end_date=None, humanize=True, format=long, si_units=True) Internal Server Error: /get-temperature-data/ Traceback (most recent call last): File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/data/projects/weather_try/my_weather/weather_app/views.py", line 14, in get_temperature_data stations = request.filter_by_station_id(station_id=("03404")) File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/provider/dwd/observation/api.py", line 501, in filter_by_station_id return super().filter_by_station_id( File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/core/timeseries/request.py", line 656, in filter_by_station_id df = self.all().df File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/core/timeseries/request.py", line 634, in all df = self._all() File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/provider/dwd/observation/api.py", line 564, in _all df = create_meta_index_for_climate_observations(dataset, self.resolution, period, self.settings) File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/provider/dwd/observation/metaindex.py", line 92, in create_meta_index_for_climate_observations meta_index = _create_meta_index_for_climate_observations(dataset, resolution, period, settings) File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/provider/dwd/observation/metaindex.py", line 148, in _create_meta_index_for_climate_observations meta_file = _find_meta_file(remote_files, url, ["beschreibung", "txt"]) File "/data/projects/weather_try/myenv/lib/python3.9/site-packages/wetterdienst/provider/dwd/observation/metaindex.py", line 172, in _find_meta_file raise MetaFileNotFoundError(f"No meta file was found amongst the files at {url}.") wetterdienst.exceptions.MetaFileNotFoundError: No meta file was found amongst the files at https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate//10_minutes/air_temperature/recent/. [10/Apr/2024 08:59:29] "GET /get-temperature-data/ HTTP/1.1" 500 102573
Expected behavior I wanted some data in stations = request.filter_by_station_id(station_id=("03404"))
Screenshots I wanted to make the output like this, where I got the data from dwd, unzipped the folder and get the data. It is laggy, hence I wanted a faster solution
Desktop (please complete the following information):