EY-Data-Science-Program / 2021-Better-Working-World-Data-Challenge

This github repository has been created for participants in the Better Working World Data Challenge. It contains code and documentation used to set up and manage an analysis environment for completing the Challenge. Please use the Discussions tab for any questions, or to have friendly discussions with other participants in the challenge!
MIT License
9 stars 5 forks source link

Error with Local Data Cube: "linescan" not present in the database #27

Open marianotomas opened 3 years ago

marianotomas commented 3 years ago

Hi All! I've followed the steps listed here to run the Local Data Cube version. Steps 1 and 2 ran without problem, but in Step 3 I had an issue with the last part "Now index some datasets", specifically with the last command:

docker-compose exec jupyter bash -c "dc-index-from-tar --protocol https --ignore-lineage -p linescan /scripts/data/linescan.tar.gz"

When tried to run it, I received this error message:

indexing /scripts/data/linescan.tar.gz Traceback (most recent call last): File "/env/bin/dc-index-from-tar", line 8, in <module> sys.exit(cli()) File "/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/env/lib/python3.6/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/env/lib/python3.6/site-packages/odc/apps/dc_tools/index_from_tar.py", line 207, in cli doc_transform=transform, File "/env/lib/python3.6/site-packages/odc/apps/dc_tools/index_from_tar.py", line 157, in process_file **ds_resolve_args, File "/env/lib/python3.6/site-packages/odc/index/_index.py", line 32, in from_metadata_stream doc2ds = Doc2Dataset(index, **kwargs) File "/env/lib/python3.6/site-packages/datacube/index/hl.py", line 249, in __init__ raise ValueError(err_msg) ValueError: Supplied product name "linescan" not present in the database ERROR: 1

I'm running it on a Windows 10 PowerSheel, as Administrator.

Also, I've tried to manually download this specificlinescan.tar.gz file directly from the GitHub repository and to copy it into the /scripts/data/ folder but still received the same error message. ¿What could be wrong?

Thank you in advance!

alexgleith commented 3 years ago

Hey @marianotomas, you need to add the product to the ODC Database first, see this step: https://github.com/EY-Data-Science-Program/2021-Better-Working-World-Data-Challenge/blob/main/install-cube.sh#L77

marianotomas commented 3 years ago

Hi! Thank you @alexgleith for your help. The problem was solved.

I'm adding some more comments about the solution (hope could help someone else):

Thank you again!