Skip to content

Commit

Permalink
Improve warning message of stripes app
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Jan 22, 2025
1 parent 1af3aaa commit a069124
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wetterdienst/ui/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,8 @@ def _plot_stripes(
try:
station_dict = stations.to_dict()["stations"][0]
except IndexError as e:
raise ValueError(f"No station with a name similar to '{name}' found") from e
parameter = "station_id" if station_id else "name"
raise ValueError(f"No station with a {parameter} similar to '{station_id or name}' found") from e

df = stations.values.all().df.sort("date")
df = df.set_sorted("date")
Expand Down

0 comments on commit a069124

Please sign in to comment.