Handle file processing errors to continue

This commit is contained in:
Antonio J. Delgado 2023-11-01 11:07:28 +02:00
parent eb636866e0
commit 9baca3ae37
3 changed files with 6 additions and 3 deletions

View file

@ -196,7 +196,10 @@ class image_classifier:
filename = os.path.basename(file)
people = list()
if self.is_image(file):
self.process_metadata(file)
try:
self.process_metadata(file)
except Exception as error:
self._log.error(f"Error processing file '{file}'. {error}")
folder_date_time = self.get_file_date(file)
if folder_date_time:
folder_date = folder_date_time.strftime(self.folder_date_format)

View file

@ -1,6 +1,6 @@
[metadata]
name = image_classifier
version = 0.0.16
version = 0.0.17
[options]
packages = image_classifier

View file

@ -9,7 +9,7 @@ if os.access(requirements_file, os.R_OK):
setuptools.setup(
scripts=['image_classifier/image_classifier.py'],
author="Antonio J. Delgado",
version='0.0.16',
version='0.0.17',
name='image_classifier',
author_email="antoniodelgado@susurrando.com",
url="",