Closed kalxas closed 7 years ago
I realized that I was using python2.7 instead of python3 for the above call. When switching to python3.4 I get the following:
Traceback (most recent call last):
File "./get_modis.py", line 331, in <module>
verbose=options.verbose, ruff=options.quick)
File "./get_modis.py", line 249, in get_modisfiles
if line.decode().find(tile) >= 0:
AttributeError: 'str' object has no attribute 'decode'
After deleting the .decode() from the above lines, I got an ssl error, which I fixed by adding the following in L331:
r1 = s.request('get', the_url, verify=False)
So then I am back to error:
Traceback (most recent call last):
File "./get_modis.py", line 331, in <module>
verbose=options.verbose, ruff=options.quick)
File "./get_modis.py", line 266, in get_modisfiles
raise IOError("Can't start download... [%s]" % fname)
OSError: Can't start download... [MOD09A1.A2016097.h19v05.005.2016110032645.hdf]
Perhaps this is relevant:
https://wiki.earthdata.nasa.gov/display/EL/How+To+Access+Data+With+Python
Working well here with 2.7 (using 7ce07df53027a3a3f8753b4e8624ac247302c9b1). Remember that on Wednesdays the LPDAAC server goes down for a few hours...
Just tested again (using the commit you proposed), same error with Python 2.7:
File "./get_modis.py", line 331, in <module>
verbose=options.verbose, ruff=options.quick)
File "./get_modis.py", line 266, in get_modisfiles
raise IOError("Can't start download... [%s]" % fname)
IOError: Can't start download... [MOD09A1.A2016105.h19v05.005.2016114072543.hdf]
The username and password work fine when downloading from the web page. Is there something else I need to do with my account to make this work (like an extra setting or extra permissions)?
My terminal line:
./get_modis.py -s MOLT -u username -P password -p MOD09A1.005 -t h19v05 -y 2016 -b 100 -e 107 -o ./ -v
hi, I managed to fix this: It was a character in my password that caused the error. Works fine after changing the password.
Thanks for your help
I don't know if this repo is still maintained but I'm getting this error:
./get_modis.py -s MOLT -u myuser -P mypaswd -p MOD09GA.061 -t h18v04 -y 2022 -b 223 -e 224 -o ./ -v
https://e4ftl01.cr.usgs.gov/MOLT/MOD09GA.061/
('them_urls', [])
<Response [401]>
Traceback (most recent call last):
File "./get_modis.py", line 327, in
any suggestions?
Hi, I am trying out this script and I am getting this response:
Any ideas?