Hello Developers and Community Members,
I really need help with a straightforward task that is not running, I hope there are many solid developers and problem solvers who could help me with the problem.
I am actually trying to download USGS Earth explorer Landsat 8 imagery using python libraries.
- the first library I used is "API from landsatxplore.api", but when I enter my login credentials and select the scene properties, it gives this error
USGSError: UNAUTHORIZED_USER: Unable to validate user API permissions.
Whereas the code is:
from landsatxplore.api import API
api = API("sabafatima1101", "#Geoinformaticionno1")
scenes = api.search(
dataset='landsat_8_c1',
latitude=33.68,
longitude=73.03,
start_date='2020-8-01',
end_date='2020-10-29',
max_cloud_cover=10
)
- the second library I'm using is "EarthExplorer from landsatxplore.earthexplorer", but when I entered my credentials it simply gave an error;
IndexError: list index out of range
whereas the code I wrote is;
ee = EarthExplorer("sabafatima1101", "#Geoinformaticionno1")
Anyone who could help me to resolve any error I would be very thankful.