Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check errors raised by empty query object from bounding box split in … #220

Merged
merged 2 commits into from
Sep 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions icepyx/core/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,17 @@ def query_icesat2_filelist(self) -> tuple:

for bbox_i in bbox_list:

region = ipx.Query(
self.product,
bbox_i,
self.date_range,
cycles=self.cycles,
tracks=self.tracks,
)
icesat2_files = region.avail_granules(ids=True)[0]
try:
region = ipx.Query(
self.product,
bbox_i,
self.date_range,
cycles=self.cycles,
tracks=self.tracks,
)
icesat2_files = region.avail_granules(ids=True)[0]
except (AttributeError, AssertionError):
continue

if not icesat2_files:
continue
Expand Down Expand Up @@ -408,6 +411,8 @@ def parallel_request_OA(self) -> da.array:
# generate parameter lists for OA requesting
OA_para_list = self.generate_OA_parameters()

assert OA_para_list, "Your search returned no results; try different search parameters"

url_number = len(OA_para_list)

if url_number > 200:
Expand Down