Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'content-disposition' when trying to download #84

Open
kelvinhkcs opened this issue Sep 18, 2022 · 2 comments
Open

KeyError: 'content-disposition' when trying to download #84

kelvinhkcs opened this issue Sep 18, 2022 · 2 comments

Comments

@kelvinhkcs
Copy link

I tried to download some scenes from Landsat with command lines and API, but same errors occur.

Errors:

File "C:\Users\user\anaconda3\envs\my_environment\lib\site-packages\landsatxplore\earthexplorer.py", line 150, in download
    filename = self._download(url, output_dir, timeout=timeout, skip=skip)
File "C:\Users\user\anaconda3\envs\my_environment\lib\site-packages\landsatxplore\earthexplorer.py", line 103, in _download
    local_filename = r.headers["Content-Disposition"].split("=")[-1]
File "C:\Users\user\anaconda3\envs\my_environment\lib\site-packages\requests\structures.py", line 52, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'content-disposition'

Command lines I used:
landsatxplore download LT05_L1TP_195051_19950807_20170107_01_T1 --username '[username]' --password '[password]'

The python I used with the API:

from landsatxplore.earthexplorer import EarthExplorer

ee = EarthExplorer('[username]', [password]')

ee.download('LT51960471995178MPS00', output_dir='./data')

ee.logout()
@dengshuaix
Copy link

me too! How to deal with it?

@ChangpeiHe
Copy link

have u solved it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants