earthobservations / wetterdienst

Open weather data for humans.
https://wetterdienst.readthedocs.io/
MIT License
350 stars 54 forks source link

Wetterdienst Explorer on streamlit.app is not working for some parameters/networks #1334

Open SB-511 opened 1 month ago

SB-511 commented 1 month ago

Describe the bug On https://wetterdienst.streamlit.app/ with some parameter combinations I get a red error message instead of the selected data.

To Reproduce

I tried with several parameter combinations, e.g.:

It works well with e.g.:

Expected behavior Showing data :)

Screenshots

image

Error Message:

File "/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling result = func() ^^^^^^ File "/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec exec(code, module.__dict__) File "/mount/src/wetterdienst/wetterdienst/ui/streamlit/explorer/app.py", line 186, in <module> df_stations = get_stations(provider, network, request_kwargs).df ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/caching/cache_utils.py", line 168, in wrapper return cached_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/caching/cache_utils.py", line 197, in __call__ return self._get_or_create_cached_value(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/caching/cache_utils.py", line 224, in _get_or_create_cached_value return self._handle_cache_miss(cache, value_key, func_args, func_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/caching/cache_utils.py", line 280, in _handle_cache_miss computed_value = self._info.func(*func_args, **func_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mount/src/wetterdienst/wetterdienst/ui/streamlit/explorer/app.py", line 40, in get_stations return Wetterdienst(provider, network)(**request_kwargs).all() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

System:

gutzbenj commented 1 month ago

Dear @SB-511 ,

thanks for reporting!

  1. DWD Mosmix was an actual issue with the setup of the request kwargs. DWD Mosmix and DMO have to be handled differently as they don't really have resolution. It should work for now with the new version - v0.94.0 was just released -but I will add some test the other day.
  2. DWD Road I still have to look into. Probably I didn't correctly drop it and it shouldn't be there at all as it requires eccodes installed on the system and on streamlit we don't have access to the underlying system at all...
  3. This is a bug, the now period is not valid for daily data. Daily data is only being published daily but not more frequently which the now period was crafted for. Will fix that the other day.

Did you have further issues?