OSError: image file is truncated
Versions
- OS: Linux
- GTK Version: 3.24.24
- PyGObject Version: 3.34.0
- GLib Version : 2.62.6
- python-nbxmpp Version: 2.0.4
- Gajim Version: 1.3.3
Traceback
Traceback (most recent call last):
File "/gnu/store/s290y990mdl36gzknz5q2hpmjrpggjia-python-pillow-8.1.1/lib/python3.8/site-packages/PIL/ImageFile.py", line 247, in load
s = read(self.decodermaxblock)
File "/gnu/store/s290y990mdl36gzknz5q2hpmjrpggjia-python-pillow-8.1.1/lib/python3.8/site-packages/PIL/PngImagePlugin.py", line 896, in load_read
cid, pos, length = self.png.read()
File "/gnu/store/s290y990mdl36gzknz5q2hpmjrpggjia-python-pillow-8.1.1/lib/python3.8/site-packages/PIL/PngImagePlugin.py", line 162, in read
length = i32(s)
File "/gnu/store/s290y990mdl36gzknz5q2hpmjrpggjia-python-pillow-8.1.1/lib/python3.8/site-packages/PIL/_binary.py", line 75, in i32be
return unpack_from(">I", c, o)[0]
struct.error: unpack_from requires a buffer of at least 4 bytes for unpacking 4 bytes at offset 0 (actual buffer size is 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/brad/.local/share/gajim/plugins/url_image_preview/url_image_preview.py", line 473, in _on_finished
if preview.create_thumbnail(data):
File "/home/brad/.local/share/gajim/plugins/url_image_preview/url_image_preview.py", line 816, in create_thumbnail
self.thumbnail = create_thumbnail(data, self.size)
File "/home/brad/.local/share/gajim/plugins/url_image_preview/utils.py", line 129, in create_thumbnail
thumbnail = create_thumbnail_with_pil(data, size)
File "/home/brad/.local/share/gajim/plugins/url_image_preview/utils.py", line 182, in create_thumbnail_with_pil
image.thumbnail((size, size))
File "/gnu/store/s290y990mdl36gzknz5q2hpmjrpggjia-python-pillow-8.1.1/lib/python3.8/site-packages/PIL/Image.py", line 2336, in thumbnail
im = self.resize(size, resample, box=box, reducing_gap=reducing_gap)
File "/gnu/store/s290y990mdl36gzknz5q2hpmjrpggjia-python-pillow-8.1.1/lib/python3.8/site-packages/PIL/Image.py", line 1912, in resize
im = self.convert(self.mode[:-1] + "a")
File "/gnu/store/s290y990mdl36gzknz5q2hpmjrpggjia-python-pillow-8.1.1/lib/python3.8/site-packages/PIL/Image.py", line 904, in convert
self.load()
File "/gnu/store/s290y990mdl36gzknz5q2hpmjrpggjia-python-pillow-8.1.1/lib/python3.8/site-packages/PIL/ImageFile.py", line 253, in load
raise OSError("image file is truncated") from e
OSError: image file is truncated
Steps to reproduce the problem
I just woke up and unlocked my PC and had two error popups that looked similar.