1

I need to run ODC locally. I am trying to use the CIAB and following the instructions in its repo. I have failed a couple of times trying to index the examples.

  1. When I first executed the command docker-compose exec jupyter datacube -v system init. I have the following warning or error.
    2021-09-02 06:31:33,948 9 datacube.drivers.driver_cache WARNING Failed to resolve driver datacube.plugins.index::default
    2021-09-02 06:31:33,949 9 datacube.drivers.driver_cache WARNING Error was: ContextualVersionConflict(numpy 1.17.4 (/usr/lib/python3/dist-packages), Requirement.parse('numpy>=1.18; extra == "array"'), {'dask'})
    
    

Is this okay? The prompt was that PostgreSQL was initialized successfully. I assumed that I can continue with the next steps.

  1. I then continued to index from the example using the command docker-compose exec jupyter bash -c "stac-to-dc --bbox='25,20,35,30' --collections='sentinel-s2-l2a-cogs' --datetime='2020-01-01/2020-03-31'" and get the following error. It seems that I cannot connect to the product storage?

    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.8/dist-packages/odc/apps/dc_tools/stac_api_to_dc.py", line 158, in stac_api_to_odc
        _ = future.result()
      File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result
        return self.__get_result()
      File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
      File "/usr/local/lib/python3.8/dist-packages/odc/apps/dc_tools/stac_api_to_dc.py", line 105, in process_item
        meta, uri = item_to_meta_uri(item, rewrite)
      File "/usr/local/lib/python3.8/dist-packages/odc/apps/dc_tools/stac_api_to_dc.py", line 88, in item_to_meta_uri
        metadata = item.to_dict()
      File "/usr/local/lib/python3.8/dist-packages/pystac/item.py", line 306, in to_dict
        "links": [link.to_dict() for link in links],
      File "/usr/local/lib/python3.8/dist-packages/pystac/item.py", line 306, in <listcomp>
        "links": [link.to_dict() for link in links],
      File "/usr/local/lib/python3.8/dist-packages/pystac/link.py", line 300, in to_dict
        d: Dict[str, Any] = {"rel": self.rel, "href": self.get_href()}
      File "/usr/local/lib/python3.8/dist-packages/pystac/link.py", line 133, in get_href
        if href and is_absolute_href(href) and self.owner and self.owner.get_root():
      File "/usr/local/lib/python3.8/dist-packages/pystac/stac_object.py", line 199, in get_root
        root_link.resolve_stac_object()
      File "/usr/local/lib/python3.8/dist-packages/pystac/link.py", line 266, in resolve_stac_object
        obj = stac_io.read_stac_object(target_href, root=root)
      File "/usr/local/lib/python3.8/dist-packages/pystac/stac_io.py", line 226, in read_stac_object
        d = self.read_json(source, *args, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/pystac/stac_io.py", line 197, in read_json
        txt = self.read_text(source, *args, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/pystac/stac_io.py", line 279, in read_text
        return self.read_text_from_href(href)
      File "/usr/local/lib/python3.8/dist-packages/pystac/stac_io.py", line 296, in read_text_from_href
        with urlopen(href) as f:
      File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
        return opener.open(url, data, timeout)
      File "/usr/lib/python3.8/urllib/request.py", line 525, in open
        response = self._open(req, data)
      File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
        result = self._call_chain(self.handle_open, protocol, protocol +
      File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
        result = func(*args)
      File "/usr/lib/python3.8/urllib/request.py", line 1397, in https_open
        return self.do_open(http.client.HTTPSConnection, req,
      File "/usr/lib/python3.8/urllib/request.py", line 1357, in do_open
        raise URLError(err)
    urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
    
    

What is causing this? Why can I not successfully index from this storage? I also need to ask some other question. Do I need CIAB or should I install the core instead? If I used core, how can I create Jupyter notebooks instances just like in the CIAB?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.