-
Notifications
You must be signed in to change notification settings - Fork 98
Closed
Description
Let's not require authentication to get CLI help. Currently, we do. It's because its implemented in the planet root command, which is executed before a sub-command's help utility, yes?
$ planet orders list --help
Traceback (most recent call last):
File "/home/seangillies/projects/planet-client-python/planet/auth.py", line 63, in from_file
secrets = _SecretFile(filename).read()
File "/home/seangillies/projects/planet-client-python/planet/auth.py", line 236, in read
with open(self.path, 'r') as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/home/seangillies/.planet.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/seangillies/projects/planet-client-python/venv2/bin/planet", line 11, in <module>
load_entry_point('planet', 'console_scripts', 'planet')()
File "/home/seangillies/projects/planet-client-python/venv2/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/seangillies/projects/planet-client-python/venv2/lib/python3.8/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/seangillies/projects/planet-client-python/venv2/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/seangillies/projects/planet-client-python/venv2/lib/python3.8/site-packages/click/core.py", line 1656, in invoke
super().invoke(ctx)
File "/home/seangillies/projects/planet-client-python/venv2/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/seangillies/projects/planet-client-python/venv2/lib/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/seangillies/projects/planet-client-python/venv2/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/seangillies/projects/planet-client-python/planet/cli/orders.py", line 48, in orders
ctx.obj['AUTH'] = planet.Auth.from_file()
File "/home/seangillies/projects/planet-client-python/planet/auth.py", line 66, in from_file
raise AuthException(f'File {filename} does not exist.')
planet.exceptions.AuthException: File /home/seangillies/.planet.json does not exist.
cholmes