OSError: image file is truncated (9 bytes not processed) #3

Closed
opened 2022-10-23 18:11:28 +02:00 by kamp · 1 comment
Owner

Traceback (most recent call last):
File "main.py", line 7, in
dr.find_duplicates()
File "/opt/similarimages/Duplicate-Remover-master/DuplicateRemover.py", line 25, in find_duplicates
temp_hash = imagehash.average_hash(img, self.hash_size)
File "/usr/local/lib/python3.8/dist-packages/imagehash.py", line 185, in average_hash
image = image.convert("L").resize((hash_size, hash_size), Image.ANTIALIAS)
File "/usr/local/lib/python3.8/dist-packages/PIL/Image.py", line 904, in convert
self.load()
File "/usr/local/lib/python3.8/dist-packages/PIL/ImageFile.py", line 259, in load
raise OSError(
OSError: image file is truncated (9 bytes not processed)

Traceback (most recent call last): File "main.py", line 7, in <module> dr.find_duplicates() File "/opt/similarimages/Duplicate-Remover-master/DuplicateRemover.py", line 25, in find_duplicates temp_hash = imagehash.average_hash(img, self.hash_size) File "/usr/local/lib/python3.8/dist-packages/imagehash.py", line 185, in average_hash image = image.convert("L").resize((hash_size, hash_size), Image.ANTIALIAS) File "/usr/local/lib/python3.8/dist-packages/PIL/Image.py", line 904, in convert self.load() File "/usr/local/lib/python3.8/dist-packages/PIL/ImageFile.py", line 259, in load raise OSError( OSError: image file is truncated (9 bytes not processed)
kamp added the
bug
label 2022-10-23 18:11:28 +02:00
kamp self-assigned this 2022-10-23 18:11:28 +02:00
Author
Owner

It is an error in the image, there is no way that the script can fix it. However, the error should be handled and useful information (filename, error message) should be displayed and the script should not abort.

It is an error in the image, there is no way that the script can fix it. However, the error should be handled and useful information (filename, error message) should be displayed and the script should not abort.
kamp closed this issue 2022-10-23 18:52:42 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kamp/SimilarImages#3
No description provided.