I have an account on the USGS and when I try to create an API instance using this code
from landsatxplore.api import API
import os
# Your USGS credentials
username = '<username>'
password = '<password>'
# Initialize a new API instance
api = API(username, password)
# Perform a request
response = api.request(endpoint="dataset-catalogs")
print(response)
I get this error message:
landsatxplore.errors.USGSError: NOT_FOUND: Invalid Endpoint.
Python version: 3.10
landsatxplore version: 0.15.0
I have an account on the USGS and when I try to create an API instance using this code
from landsatxplore.api import API
import os
# Your USGS credentials
username = '<username>'
password = '<password>'
# Initialize a new API instance
api = API(username, password)
# Perform a request
response = api.request(endpoint="dataset-catalogs")
print(response)
I get this error message:
landsatxplore.errors.USGSError: NOT_FOUND: Invalid Endpoint.
Python version: 3.10
landsatxplore version: 0.15.0
Share Improve this question asked Mar 15 at 10:23 FedericoFederico 4431 gold badge5 silver badges22 bronze badges1 Answer
Reset to default 0If you're talking about this landsatxplore
package, it is no longer maintained and notably the new way to login to the API via token is not supported, so the package broke in February 2025:
https://github/yannfet/landsatxplore/issues/126