fix: [qrcode extractor] filter invalid image
Some checks are pending
CI / ail_test (3.10) (push) Waiting to run
CI / ail_test (3.7) (push) Waiting to run
CI / ail_test (3.8) (push) Waiting to run
CI / ail_test (3.9) (push) Waiting to run

This commit is contained in:
terrtia 2024-10-02 15:36:07 +02:00
parent ee02a72288
commit 86af7dd749
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -55,7 +55,7 @@ class QrCodeReader(AbstractModule):
image = cv2.cvtColor(cv2.imread(path), cv2.COLOR_BGR2RGB)
except cv2.error:
self.logger.warning(f'Invalid image: {self.obj.get_global_id()}')
return []
return False, []
try:
decodeds = decode(image)