Skip to content

Commit cfc50cc

Browse files
committed
Error message when area of interest isn't defined
1 parent 9ffd8de commit cfc50cc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/virtualship/cli/commands.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ def fetch(path: str | Path, username: str | None, password: str | None) -> None:
7979

8080
schedule = _get_schedule(path)
8181

82+
if schedule.area_of_interest is None:
83+
raise ValueError(
84+
"Area of interest not found in schedule, please define it to fetch the data."
85+
)
86+
8287
aoi_hash = hash_model(schedule.area_of_interest)
8388

8489
existing_download = get_existing_download(data_folder, aoi_hash)

0 commit comments

Comments
 (0)