Closed AkshathRaghav closed 1 year ago
@AkshathRaghav I thank you for your Pull Request. The main purpose of this repository is to create a Python wrapper for the USGS API. I would like to point out that the code in the otherMethods.py file is more of a supplement to the main code - the USGS API wrapper. Writing the code for convenient data loading is a separate task that requires considerable effort and time.
@MrChebur Thank you for replying! I've resolved the changes you wanted. I found your code really helpful and gave me the flexibility to do what I wanted, so I hoped this small change might help others trying to do the same as me.
Hi @MrChebur! Been using your python wrapper for a research project where we are gathering USGS data.
Noticed that when I try downloading data from any "BUNDLE" product under any dataset (eg, landsat_ba_tile_c2), the
requests.head(url, allow_redirects=True).headers
[Line 67] in theotherMethods.py
file returns a 400 Error. This seems to be an issue from the AWS side, and we get an error message within the JSON object.To solve this, I am currently checking whether the requested product is a BUNDLE product, and just find the name of the file from the
url
within the class and save it based on that.The changes are in the
download()
and_download()
functions.These changes seem to be a more of a quick fix since the wrapper only faces issues with
.tar
files. Hopefully, they are acceptable to you.