OSError: image file is truncated (9 bytes not processed) #3
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kamp/SimilarImages#3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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)
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.