twVolc / PyCamPermanent

Permanent PiCam (SO2) installation project software
GNU General Public License v3.0
1 stars 2 forks source link

No warning if config load fails #141

Open twVolc opened 1 month ago

twVolc commented 1 month ago

At the moment there is no notification to the user if loading a config file fails - the error output is only in the python terminal. It might be best to catch any errors associated with config loading within the main load function and then have an error/warning pop-up in the GUI to say that the load was unsuccessful.

I think this is most likely to happen when file paths don't exist so certain aspects can't be correctly loaded in - e.g. I'm working a lot with data from an external SSD, and if this isn't plugged in the config load fails and it isn't immediately clear to me why. I wonder if a generic error message saying "Config load has failed, please check all file paths in your config file exist and try again" might help. It would certainly prompt me to remember that I've probably forgotten to plug in my SSD...

tpering commented 1 month ago

Does this link to issue #124 as well? If a default config file has been changed to one that has a link to an external on it, the software will fail to load. Is there a way of reverting to the default config file and giving the user a warning?

twVolc commented 1 month ago

Ah yes they're very similar! For #124, like you suggest, the software should resort to the default (the stock Villaricca should always be safe and available) and then provide a warning; for this one we just need that warning and the software will stay configured however it was before attempting to load the config.