[Python] Failing to initialise a new USGS API instance

Discussão em 'Python' iniciado por Stack, Março 15, 2025.

  1. Stack

    Stack Membro Participativo

    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

    Continue reading...

Compartilhe esta Página