tyson-swetnam/porder

A KeyError related to AWS delivery

Closed this issue · 3 comments

We got an error days ago when trying to deliver the Planet images to our AWS S3. The error won't block our work but it is better to fix it. Here is the error:

I ran first to order the idlist, everything is fine so far, then use the command line below to get the download link:
porder order --name 'ghana_order' --idlist '~/spatial/data/orderlist/orderlist_ghana_group1.csv' --item 'PSScene4Band' --asset 'analytic_sr' --aws '~/common/aws_cred.yml' --op aws

Then I started the delivery by using:
porder download --url 'https://api.planet.com/compute/ops/orders/v2/********-****-****-****-********'
Even though the images were delivered successfully, but we keep getting this error. Didn't get a chance to look over the raw code yet, sorry I cannot be more specific. Hope you guys could find out what is going on.

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/bin/porder", line 10, in <module> sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/porder/porder.py", line 290, in main args.func(args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/porder/porder.py", line 156, in download_from_parser ext=args.ext) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/porder/downloader.py", line 71, in download url=(items['location']) KeyError: 'location'

Hi @LLeiSong
If you are using the AWS delivery you do not have to use the download tool at all, the order itself delivers the image directly into your AWS bucket. The download tool is designed to be used Only if you are downloading the files locally. In your case, this completes your order to AWS

porder order --name 'ghana_order' --idlist '~/spatial/data/orderlist/orderlist_ghana_group1.csv' --item 'PSScene4Band' --asset 'analytic_sr' --aws '~/common/aws_cred.yml' --op aws

Hope that helps and I can close the issue

Sam

Could you share an example of what the .yml file should look like? I'm struggling to get the setup right for direct delivery to GCS.
Thanks!