Catch generic model errors

Prevent the app from dying on invalid models.
This commit is contained in:
d8ahazard 2023-10-17 21:59:04 -05:00 committed by psychedelicious
parent 0a01d86ab1
commit fdf02c33d0

View File

@ -1011,6 +1011,8 @@ class ModelManager(object):
self.logger.warning(f"Not a valid model: {model_path}. {e}")
except NotImplementedError as e:
self.logger.warning(e)
except Exception as e:
self.logger.warning(f"Error loading model {model_path}. {e}")
imported_models = self.scan_autoimport_directory()
if (new_models_found or imported_models) and self.config_path: