Closed guy1ziv2 closed 6 years ago
p.s. I managed to get ppipe.py -h to work when I added this code -
from planet.api.utils import write_planet_json write_planet_json({'key': 'my-key-here'})
and I tested that using find_api_key() would have worked...
Hi Sam - thanks for making this tool! I am trying to use it on a Google Colab and I get an error
%%bash export PL_API_KEY=I-have-my-key-here cd Planet-GEE-Pipeline-CLI/ppipe python ppipe.py -h
Traceback (most recent call last): File "ppipe.py", line 20, in
from idlst import idl
File "/content/Planet-GEE-Pipeline-CLI/ppipe/idlst.py", line 14, in
PL_API_KEY = read_planet_json()['key']
KeyError: 'key'
I think the error originate in line 14 of idlst.py . I don't have the key as a .planet.json on the (temporary) VM. I am not sure why you don't use find_api_key() from planet.api.auth instead, which will check for PL_API_KEY first, and if not found try open the same json file ?
Cheers Guy