<type 'exceptions.IOError'> | Python 2.7.15+: /usr/bin/python2 Mon Mar 17 22:41:02 2025 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/var/www/artrz.ru/htdocs/src/index.py in <module>() |
279 img.thumbnail(max_size, Image.ANTIALIAS) |
280 result = cStringIO.StringIO() |
=> 281 img.save(result, "JPEG") |
282 result = result.getvalue() |
283 header["Content-Type"] = "image/jpeg" |
img = <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=96x148>, img.save = <bound method PngImageFile.save of <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=96x148>>, result = <cStringIO.StringO object> |
/usr/local/lib/python2.7/dist-packages/PIL/Image.py in save(self=<PIL.PngImagePlugin.PngImageFile image mode=RGBA size=96x148>, fp=<cStringIO.StringO object>, format='JPEG', **params={}) |
2086 |
2087 try: |
=> 2088 save_handler(self, fp, filename) |
2089 finally: |
2090 # do what we can to clean up |
save_handler = <function _save>, self = <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=96x148>, fp = <cStringIO.StringO object>, filename = '' |
/usr/local/lib/python2.7/dist-packages/PIL/JpegImagePlugin.py in _save(im=<PIL.PngImagePlugin.PngImageFile image mode=RGBA size=96x148>, fp=<cStringIO.StringO object>, filename='') |
628 rawmode = RAWMODE[im.mode] |
629 except KeyError: |
=> 630 raise IOError("cannot write mode %s as JPEG" % im.mode) |
631 |
632 info = im.encoderinfo |
builtin IOError = <type 'exceptions.IOError'>, im = <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=96x148>, im.mode = 'RGBA' |
<type 'exceptions.IOError'>: cannot write mode RGBA as JPEG
args =
('cannot write mode RGBA as JPEG',)
errno =
None
filename =
None
message =
'cannot write mode RGBA as JPEG'
strerror =
None