Closed bmurch closed 7 years ago
@bmurch which version are you using? This may have been fixed in 0.13.1
searobin 175 :/tmp/test> /usr/bin/landsat --version landsat version 0.11.0
I'll get the newest code and check this.
Thanks, that worked like a charm. searobin 180 :/tmp/test> landsat search -p 31,36 -s 2016-02-01 -e 2016-04-30 -c 100 ===> 6 items were found { "limit": 10, "results": [ { "cloud": 55.72, "date": "2016-04-29", "path": "031", "row": "036", "sat_type": "L8", "sceneID": "LC80310362016120LGN00", "thumbnail": "http://earthexplorer.usgs.gov/browse/landsat_8/2016/031/036/LC80310362016120LGN00.jpg" }, { "cloud": 3.78, "date": "2016-04-13", "path": "031", "row": "036", "sat_type": "L8", "sceneID": "LC80310362016104LGN00", "thumbnail": "http://earthexplorer.usgs.gov/browse/landsat_8/2016/031/036/LC80310362016104LGN00.jpg" }, { "cloud": 0.05, "date": "2016-03-28", "path": "031", "row": "036", "sat_type": "L8", "sceneID": "LC80310362016088LGN00", "thumbnail": "http://earthexplorer.usgs.gov/browse/landsat_8/2016/031/036/LC80310362016088LGN00.jpg" }, { "cloud": 19.97, "date": "2016-03-12", "path": "031", "row": "036", "sat_type": "L8", "sceneID": "LC80310362016072LGN00", "thumbnail": "http://earthexplorer.usgs.gov/browse/landsat_8/2016/031/036/LC80310362016072LGN00.jpg" }, { "cloud": 0.04, "date": "2016-02-25", "path": "031", "row": "036", "sat_type": "L8", "sceneID": "LC80310362016056LGN00", "thumbnail": "http://earthexplorer.usgs.gov/browse/landsat_8/2016/031/036/LC80310362016056LGN00.jpg" }, { "cloud": 0.06, "date": "2016-02-09", "path": "031", "row": "036", "sat_type": "L8", "sceneID": "LC80310362016040LGN00", "thumbnail": "http://earthexplorer.usgs.gov/browse/landsat_8/2016/031/036/LC80310362016040LGN00.jpg" } ], "status": "SUCCESS", "total": 6, "total_returned": 6 } ['Search completed!']
A month ago, the search component of the tool was working correctly, now the search fails like this: searobin 169 :/tmp/test> landsat search -p 31,36 -s 2016-02-01 -e 2016-04-30 -c 100 Traceback (most recent call last): File "/usr/bin/landsat", line 8, in
landsat.landsat.main()
File "/usr/lib/python2.7/site-packages/landsat/landsat.py", line 472, in main
print(main(args))
File "/usr/lib/python2.7/site-packages/landsat/landsat.py", line 334, in main
geojson=args.geojson)
File "/usr/lib/python2.7/site-packages/landsat/search.py", line 139, in search
result['total'] = r_dict['meta']['results']['total']
KeyError: 'results'
However, the download works fine: searobin 170 :/tmp/test> landsat download --force-unzip --dest /tmp/test/LC80150422013111LGN01/ LC80150422013111LGN01 ===> Downloading: LC80150422013111LGN01.tar.bz 100% 777.8 MiB 63.5 MiB/s 0:00:00 ETA stored at /tmp/test/LC80150422013111LGN01/ ===> Download Completed ===> Done! Time spent : 11.72 seconds