Closed diogocaribe closed 6 years ago
Hi :)
I have the same problem, could you please let me know if you found a solution?
Thank you very much.
Hi Salma Sabor,
If you want only image from USGS you have to do what answered me in it (https://gis.stackexchange.com/questions/265660/why-my-sceneid-doesnt-work-to-download-in-landsat-utils).
However if you can download landsat only in Amazon or Google, remove login and password from your python script and it will collect the file in them.
Regards
My frieds,
I tried to run code to download LC8 images with python program. However occurred some trouble that I couldn't solve. When I run my code was showed up this massage:
Traceback (most recent call last): File "/home/dogsousa/virtualenviroment/lib/python3.5/site-packages/landsat/downloader.py", line 73, in download raise RemoteFileDoesntExist landsat.downloader.RemoteFileDoesntExist
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/dogsousa/virtualenviroment/lib/python3.5/site-packages/landsat/downloader.py", line 78, in download files.append(self.google_storage(scene, self.download_dir)) File "/home/dogsousa/virtualenviroment/lib/python3.5/site-packages/landsat/downloader.py", line 127, in google_storage self.remote_file_exists(url) File "/home/dogsousa/virtualenviroment/lib/python3.5/site-packages/landsat/downloader.py", line 258, in remote_file_exists raise RemoteFileDoesntExist landsat.downloader.RemoteFileDoesntExist
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/dogsousa/opt/pycharm-community-2017.2.4/helpers/pydev/pydevd.py", line 1599, in
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/dogsousa/opt/pycharm-community-2017.2.4/helpers/pydev/pydevd.py", line 1026, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/dogsousa/opt/pycharm-community-2017.2.4/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/dogsousa/PycharmProjects/download_landsat/landsat_utils_teste.py", line 22, in
d.download([sceneID])
File "/home/dogsousa/virtualenviroment/lib/python3.5/site-packages/landsat/downloader.py", line 80, in download
files.append(self.usgs_eros(scene, self.download_dir))
File "/home/dogsousa/virtualenviroment/lib/python3.5/site-packages/landsat/downloader.py", line 99, in usgs_eros
download_url = api.download('LANDSAT_8', 'EE', [scene], api_key=api_key)
File "/home/dogsousa/virtualenviroment/lib/python3.5/site-packages/usgs/api.py", line 136, in download
_check_for_usgs_error(response)
File "/home/dogsousa/virtualenviroment/lib/python3.5/site-packages/usgs/api.py", line 35, in _check_for_usgs_error
raise USGSError('%s: %s' % (error_code, error))
usgs.USGSError: AUTH_UNAUTHORIZED: Forbidden - Approved role required for access to 'download' method.
I don't know what to do and I need some help to overcome this situation well.