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

unable to download c2l1 data prior to December 2020 #42

Open
22epl2 opened this issue Mar 23, 2021 · 3 comments
Open

unable to download c2l1 data prior to December 2020 #42

22epl2 opened this issue Mar 23, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@22epl2
Copy link

22epl2 commented Mar 23, 2021

Hello,
Thanks for creating this great API. I'm unfortunately having trouble downloading any collect 2 level 1 data prior to December 2020. For example, I would like to download LC08_L1TP_044035_20200130_20200823_02_T1, a c2l1 scene from January 2020. landsatxplore download --username <USERNAME> --password <PASSWORD> LC08_L1TP_044035_20200130_20200823_02_T1 errors out with landsatxplore.errors.EarthExplorerError: Download is not available, as does attempting to download with the entity id using landsatxplore download --username <USERNAME> --password <PASSWORD> --dataset landsat_ot_c2_l1 LC80440342020030LGN00. I have also tried going directly to the download URL, https://earthexplorer.usgs.gov/download/5e81f14ff4f9941c/LC80440342020030LGN00/EE/, and encountered the same error. This issue does not affect data from December 2020 or later.

@yannforget
Copy link
Owner

Hello and thanks for the bug report,

Did you try to launch the command again with the same entity ID a few minutes/hours later ? I noticed that some products are made available once requested.

I am gonna check if we have some info about download availability in the metadata returned by the API

@yannforget yannforget added the bug Something isn't working label Mar 24, 2021
@22epl2
Copy link
Author

22epl2 commented Mar 24, 2021

Hi, thanks for the response. I can't say if I requested that specific product with the CLI multiple times within a few hours, but I can confirm that I requested a number of products over the API repeatedly within a few hours and also over a couple days.

@hiewliwen
Copy link

hiewliwen commented Aug 13, 2021

I faced the same issue. The workaround is a combination of #45 and de530c1

In summary, at earthexplorer.py:

DATA_PRODUCTS_II = {
    "landsat_tm_c1": "5e83d08fd9932768",
    "landsat_etm_c1": "5e83a507d6aaa3db",
    "landsat_8_c1": "5e83d0b84df8d8c2",
    "landsat_tm_c2_l1": "5e83d0a0f94d7d8d",
    "landsat_etm_c2_l1": "5e83d0d08fec8a66",
    "landsat_ot_c2_l1": "5e81f14f92acf9ef",
    "landsat_tm_c2_l2": "5e83d11933473426",
    "landsat_etm_c2_l2": "5e83d12aed0efa58",
    "landsat_ot_c2_l2": "5e83d14fec7cae84",
    "sentinel_2a": "5e83a42c6eba8084",
}

and

    try:
        url = EE_DOWNLOAD_URL.format(
            data_product_id=DATA_PRODUCTS[dataset], entity_id=entity_id
            )
        filename = self._download(url, output_dir, timeout=timeout, skip=skip)
    except:
        url = EE_DOWNLOAD_URL.format(
            data_product_id=DATA_PRODUCTS_II[dataset], entity_id=entity_id
            )
        filename = self._download(url, output_dir, timeout=timeout, skip=skip)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants