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
below is my script for downloading landsat 8 data:
import landsatxplore.api
from landsatxplore.earthexplorer import EarthExplorer
# Initialize a new API instance and get an access key
api = landsatxplore.api.API(username='xxxxx', password='xxx')
# Request
scenes = api.search(
dataset='LANDSAT_8_C1',
latitude=38.7,
longitude=115.5,
start_date='2019-01-01',
end_date='2020-01-01',
max_cloud_cover=50)
print('{} scenes found.'.format(len(scenes)))
ee = EarthExplorer(username='xxxxx', password='xxx')
for scene in scenes:
print(scene['acquisitionDate'], scene['entityId'])
ee.download(scene_id=scene['entityId'], output_dir='.')
api.logout()
ee.logout()
and the error msg looks like this:
20 scenes found.
2019-01-05 LC81230332019005LGN00
Traceback (most recent call last):
File "download.py", line 21, in <module>
ee.download(scene_id=scene['entityId'], output_dir='.')
File "/home/user/anaconda3/lib/python3.7/site-packages/landsatxplore-0.6-py3.7.egg/landsatxplore/earthexplorer.py", line 95, in download
filename = self._download(url, output_dir)
File "/home/user/anaconda3/lib/python3.7/site-packages/landsatxplore-0.6-py3.7.egg/landsatxplore/earthexplorer.py", line 75, in _download
file_size = int(r.headers.get("Content-Length"))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Could you please give me a hint on this error?
The text was updated successfully, but these errors were encountered:
below is my script for downloading landsat 8 data:
and the error msg looks like this:
Could you please give me a hint on this error?
The text was updated successfully, but these errors were encountered: