Open niggle opened 5 years ago
The whole backtrace is missing but from what I can see in the pilkit
's FileWrapper
it looks like that the file that is wrapped is not actual file but something file like which does not have fileno
. I'm not completely why we catch UnsupportedOperation
and raise AttributeError
instead.
You said that the option to compress images is the problem right? Which means that if you remove the options
completely it will work right?
sorry for the missing backtrace. yes only when i put compression inside options. if i remove compression it works great, also works if i remove all options.
if i try to make the compression directly with pillow also works fine.
later i'll put the all backtrace.
In the traceback we can see that the problem is caused in pilkit.utils.img_to_fobj
by passing StringIO
(actually BytesIO
in Python3 but called StringIO for legacy reasons - Python2) instead of real file which has fileno
method. The Tiff plugin in PIL is requiring the file to be real (to have fileno
method). This can be considered bug in pilkit
or bug in PIL
/PIllow
. Usage of the fileno
in PIL
/Pillow
probably is for performance reasons but probably there should be a workaround for non real files (file like objects) for StringIO/BytesIO.
When i try to use option compression for tiff images, raises an error
error:
any idea of how can i solve this??