You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the sentinelsat library to connect to the Copernicus Open Access Hub, a UnicodeEncodeError occurs during authentication if the password contains characters outside the Latin-1 (ISO-8859-1) range. This issue stems from the underlying requests library attempting to encode the credentials in Latin-1 when constructing the Authorization header for basic authentication.
Steps to Reproduce:
Instantiate SentinelAPI with a username and password that includes characters beyond the Latin-1 range.
Attempt to make a request to the API.
Expected Behavior:
Credentials should be properly handled and encoded, allowing successful authentication against the API even when the password contains characters beyond the Latin-1 range.
Actual Behavior:
Attempting to execute a request results in a UnicodeEncodeError, indicating an issue with encoding the password characters.
Possible Solution:
Manually encode the credentials in UTF-8 and then in base64, bypassing the automatic processing by the requests library. For example, modify the init method of the SentinelAPI class to directly set the Authorization header with the credentials encoded in base64.
The text was updated successfully, but these errors were encountered:
When using the sentinelsat library to connect to the Copernicus Open Access Hub, a UnicodeEncodeError occurs during authentication if the password contains characters outside the Latin-1 (ISO-8859-1) range. This issue stems from the underlying requests library attempting to encode the credentials in Latin-1 when constructing the Authorization header for basic authentication.
Steps to Reproduce:
Expected Behavior:
Credentials should be properly handled and encoded, allowing successful authentication against the API even when the password contains characters beyond the Latin-1 range.
Actual Behavior:
Attempting to execute a request results in a UnicodeEncodeError, indicating an issue with encoding the password characters.
Possible Solution:
Manually encode the credentials in UTF-8 and then in base64, bypassing the automatic processing by the requests library. For example, modify the init method of the SentinelAPI class to directly set the Authorization header with the credentials encoded in base64.
The text was updated successfully, but these errors were encountered: