-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack trace printout when system is not configured #517
Comments
So we'll need to check if the configuration file exists, and if it doesn't, inform the user (also linking to the documentation on the config file?) but is there anything else about this that we should know (common error cases other than the config not existing where expected)? |
I think the main error is when no configuration file exists. I believe there are already reasonable error messages printed for things like the database not being initialised, or not being able to connect to the database. The change @Kirill888 mentioned in the Zoom about configuration via environment variables alone will impact this, but, can be dealt with later. |
So is it OK for me to work on this, or should I work on something else? |
Go for it! |
I can add config from ENV in a way that should not interfere with your work @jcrattz, I'll start with just copying functions for parsing that, we can plug it in later. |
Expected behaviour
Expect to see some helpful message
Actual behaviour
See
ValueError
stack traceSteps to reproduce the behaviour
Run
datacube system check
in the environment where there is no~/.datacube.conf
and no/etc/datacube.conf
andDATACUBE_CONFIG_PATH
is not set.Exception is raised from
LocalConfig
constructor and is not caught by adapter helper indatacube.ui.click
datacube-core/datacube/config.py
Line 94 in 1d998b8
pass_context
decoratordatacube-core/datacube/ui/click.py
Line 190 in 1d998b8
Similar issues with
pass_index
decorator, if there are exceptions they should be caught and converted to proper termination viaclick
library "abort with error message mechanisms".Environment information
This is
develop
on Ubuntu 18.04, but really anywhere will trigger the same error, and problem applies to older versions probably also.The text was updated successfully, but these errors were encountered: