Sentinel 2: No products match search terms
nanaboamah89 opened this issue · 1 comments
Sentinel 2 products are not loading and it gives the error below:
Code:
ds = dc.load(product="s2_12a", x=(24.65, 24.75), y=(-20.05, -20.15), time=("2018-01-01", "2018-12-31"))
Error:
`
ValueError Traceback (most recent call last)
in
2 x = (24.60, 24.80), #Prestea Huni Valley district, Ghana
3 y = (-20.05, -20.25),
----> 4 time=("2018-01-01", "2018-12-31"))
5
6 print(ds)
/env/lib/python3.6/site-packages/datacube/api/core.py in load(self, product, measurements, output_crs, resolution, resampling, skip_broken_datasets, dask_chunks, like, fuse_func, align, datasets, progress_cbk, **query)
290
291 if datasets is None:
--> 292 datasets = self.find_datasets(product=product, like=like, ensure_location=True, **query)
293 elif isinstance(datasets, collections.abc.Iterator):
294 datasets = list(datasets)
/env/lib/python3.6/site-packages/datacube/api/core.py in find_datasets(self, **search_terms)
329 .. seealso:: :meth:group_datasets
:meth:load_data
:meth:find_datasets_lazy
330 """
--> 331 return list(self.find_datasets_lazy(**search_terms))
332
333 def find_datasets_lazy(self, limit=None, ensure_location=False, **kwargs):
/env/lib/python3.6/site-packages/datacube/api/core.py in (.0)
354
355 if ensure_location:
--> 356 datasets = (dataset for dataset in datasets if dataset.uris)
357
358 return datasets
/env/lib/python3.6/site-packages/datacube/api/core.py in select_datasets_inside_polygon(datasets, polygon)
681 assert polygon is not None
682 query_crs = polygon.crs
--> 683 for dataset in datasets:
684 if intersects(polygon, dataset.extent.to_crs(query_crs)):
685 yield dataset
/env/lib/python3.6/site-packages/datacube/index/_datasets.py in search(self, limit, **query)
510 for product, datasets in self._do_search_by_product(query,
511 source_filter=source_filter,
--> 512 limit=limit):
513 yield from self._make_many(datasets, product)
514
/env/lib/python3.6/site-packages/datacube/index/_datasets.py in _do_search_by_product(self, query, return_fields, select_field_names, with_source_ids, source_filter, limit)
633 product_queries = list(self._get_product_queries(query))
634 if not product_queries:
--> 635 raise ValueError('No products match search terms: %r' % query)
636
637 for q, product in product_queries:
ValueError: No products match search terms: {'time': Range(begin=datetime.datetime(2018, 1, 1, 0, 0, tzinfo=), end=datetime.datetime(2018, 12, 31, 23, 59, 59, 999999, tzinfo=tzutc())), 'lat': Range(begin=-20.25, end=-20.05), 'lon': Range(begin=24.6, end=24.8), 'product': 's2_12a'}
`