IOError: encoder zip not available

I am running Debian Jessie on two hosts, both of which have privacyIDEA
installed; works perfectly on host A but I get this error on machine B when
I try to enroll a new token “IOError: encoder zip not available”

I have re-installed Pillow by forcibly removing it as such (dpkg -r
–force-depends “python-pil:amd64”); followed by a re-install (apt-get
install python-pil:amd64) but the results are the same; “encoder zip not
available”

Here is an excerpt from my privacyidea.log

File “/usr/lib/python2.7/dist-packages/privacyidea/api/token.py”, line
239, in init
init_details = tokenobject.get_init_detail(param, user)
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/log.py”, line 125,
in log_wrapper
f_result = func(*args, **kwds)
File
"/usr/lib/python2.7/dist-packages/privacyidea/lib/tokens/hotptoken.py",
line 160, in get_init_detail
response_detail = TokenClass.get_init_detail(self, params, user)
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/tokenclass.py”,
line 1078, in get_init_detail
"img": create_img(otpkey, width=200)}
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/utils.py”, line
56, in create_img
o_data = create_png(data, alt=alt)
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/utils.py”, line
31, in create_png
img.save(output)
File “/usr/lib/python2.7/dist-packages/qrcode/image/pil.py”, line 32, in
save
self._img.save(stream, kind)
File “/usr/local/lib/python2.7/dist-packages/PIL/Image.py”, line 1439, in
save
save_handler(self, fp, filename)
File “/usr/local/lib/python2.7/dist-packages/PIL/PngImagePlugin.py”, line
572, in _save
ImageFile._save(im, _idat(fp, chunk), [(“zip”, (0,0)+im.size, 0,
rawmode)])
File “/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py”, line 481,
in _save
e = Image._getencoder(im.mode, e, a, im.encoderconfig)
File “/usr/local/lib/python2.7/dist-packages/PIL/Image.py”, line 401, in
_getencoder
raise IOError(“encoder %s not available” % encoder_name)
IOError: encoder zip not available
Enter code here…

Hello,

your error message reads:

File “/usr/local/lib/python2.7/dist-packages/PIL/Image.py”, line 401, in
_getencoder
raise IOError(“encoder %s not available” % encoder_name)

But I guess the PIL debian package you installed is located at

/usr/lib/python2.7/dist-packages/PIL/Image.py (without local)

So I assume you have installed PIL manually without zip support.

Check the files in python-pil. I further assume they are not located
in /usr/local/lib/python but in /usr/lib/python.

I then would remove the
directory /usr/local/lib/python2.7/dist-packages/PIL/.

This should do the trick.

Kind regards
CorneliusAm Sonntag, den 20.12.2015, 20:47 -0800 schrieb pr1m35:

I am running Debian Jessie on two hosts, both of which have
privacyIDEA installed; works perfectly on host A but I get this error
on machine B when I try to enroll a new token “IOError: encoder zip
not available”

I have re-installed Pillow by forcibly removing it as such (dpkg -r
–force-depends “python-pil:amd64”); followed by a re-install (apt-get
install python-pil:amd64) but the results are the same; “encoder zip
not available”

Here is an excerpt from my privacyidea.log

File “/usr/lib/python2.7/dist-packages/privacyidea/api/token.py”,
line 239, in init
init_details = tokenobject.get_init_detail(param, user)
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/log.py”, line
125, in log_wrapper
f_result = func(*args, **kwds)
File
“/usr/lib/python2.7/dist-packages/privacyidea/lib/tokens/hotptoken.py”, line 160, in get_init_detail
response_detail = TokenClass.get_init_detail(self, params, user)
File
“/usr/lib/python2.7/dist-packages/privacyidea/lib/tokenclass.py”, line
1078, in get_init_detail
“img”: create_img(otpkey, width=200)}
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/utils.py”,
line 56, in create_img
o_data = create_png(data, alt=alt)
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/utils.py”,
line 31, in create_png
img.save(output)
File “/usr/lib/python2.7/dist-packages/qrcode/image/pil.py”, line
32, in save
self._img.save(stream, kind)
File “/usr/local/lib/python2.7/dist-packages/PIL/Image.py”, line
1439, in save
save_handler(self, fp, filename)
File “/usr/local/lib/python2.7/dist-packages/PIL/PngImagePlugin.py”,
line 572, in _save
ImageFile._save(im, _idat(fp, chunk), [(“zip”, (0,0)+im.size, 0,
rawmode)])
File “/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py”, line
481, in _save
e = Image._getencoder(im.mode, e, a, im.encoderconfig)
File “/usr/local/lib/python2.7/dist-packages/PIL/Image.py”, line
401, in _getencoder
raise IOError(“encoder %s not available” % encoder_name)
IOError: encoder zip not available
Enter code here…


You received this message because you are subscribed to the Google
Groups “privacyidea” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/2821018d-8c0d-4800-ad64-2be173b0b194%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
@cornelinux
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel

signature.asc (836 Bytes)

Hello Joel,

that’s great!

An thanks a lot for the feedback.

Kind regards
CorneliusAm Freitag, den 08.01.2016, 22:02 -0600 schrieb Joel Eames:

Removing

“/usr/local/lib/python2.7/dist-packages/PIL/”

Resolved this; 100% right!

Thanks!

On Sun, Dec 20, 2015 at 11:57 PM, Cornelius Kölbel <@cornelinux> wrote:
Hello,

    your error message reads:
    
    File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py",
    line 401, in
    _getencoder
        raise IOError("encoder %s not available" % encoder_name)
    
    
    But I guess the PIL debian package you installed is located at
    
    /usr/lib/python2.7/dist-packages/PIL/Image.py (without local)
    
    
    So I assume you have installed PIL manually without zip
    support.
    
    Check the files in python-pil. I further assume they are not
    located
    in /usr/local/lib/python but in /usr/lib/python.
    
    I then would remove the
    directory /usr/local/lib/python2.7/dist-packages/PIL/.
    
    This should do the trick.
    
    Kind regards
    Cornelius
    
    Am Sonntag, den 20.12.2015, 20:47 -0800 schrieb pr1m35:
    > I am running Debian Jessie on two hosts, both of which have
    > privacyIDEA installed; works perfectly on host A but I get
    this error
    > on machine B when I try to enroll a new token "IOError:
    encoder zip
    > not available"
    >
    >
    > I have re-installed Pillow by forcibly removing it as such
    (dpkg -r
    > --force-depends "python-pil:amd64"); followed by a
    re-install (apt-get
    > install python-pil:amd64) but the results are the same;
    "encoder zip
    > not available"
    >
    >
    > Here is an excerpt from my privacyidea.log
    >
    >
    >   File
    "/usr/lib/python2.7/dist-packages/privacyidea/api/token.py",
    > line 239, in init
    >     init_details = tokenobject.get_init_detail(param, user)
    >   File
    "/usr/lib/python2.7/dist-packages/privacyidea/lib/log.py",
    line
    > 125, in log_wrapper
    >     f_result = func(*args, **kwds)
    >   File
    >
    "/usr/lib/python2.7/dist-packages/privacyidea/lib/tokens/hotptoken.py", line 160, in get_init_detail
    >     response_detail = TokenClass.get_init_detail(self,
    params, user)
    >   File
    >
    "/usr/lib/python2.7/dist-packages/privacyidea/lib/tokenclass.py", line
    > 1078, in get_init_detail
    >     "img": create_img(otpkey, width=200)}
    >   File
    "/usr/lib/python2.7/dist-packages/privacyidea/lib/utils.py",
    > line 56, in create_img
    >     o_data = create_png(data, alt=alt)
    >   File
    "/usr/lib/python2.7/dist-packages/privacyidea/lib/utils.py",
    > line 31, in create_png
    >     img.save(output)
    >   File
    "/usr/lib/python2.7/dist-packages/qrcode/image/pil.py", line
    > 32, in save
    >     self._img.save(stream, kind)
    >   File
    "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line
    > 1439, in save
    >     save_handler(self, fp, filename)
    >   File
    "/usr/local/lib/python2.7/dist-packages/PIL/PngImagePlugin.py",
    > line 572, in _save
    >     ImageFile._save(im, _idat(fp, chunk), [("zip",
    (0,0)+im.size, 0,
    > rawmode)])
    >   File
    "/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py",
    line
    > 481, in _save
    >     e = Image._getencoder(im.mode, e, a, im.encoderconfig)
    >   File
    "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line
    > 401, in _getencoder
    >     raise IOError("encoder %s not available" % encoder_name)
    > IOError: encoder zip not available
    > Enter code here...
    >
    >
    >
    >
    >
    >
    > --
    > You received this message because you are subscribed to the
    Google
    > Groups "privacyidea" group.
    > To unsubscribe from this group and stop receiving emails
    from it, send
    > an email to privacyidea+unsubscribe@googlegroups.com.
    > To post to this group, send email to
    privacyidea@googlegroups.com.
    > To view this discussion on the web visit
    >
    https://groups.google.com/d/msgid/privacyidea/2821018d-8c0d-4800-ad64-2be173b0b194%40googlegroups.com.
    > For more options, visit https://groups.google.com/d/optout.
    
    --
    Cornelius Kölbel
    @cornelinux
    +49 151 2960 1417
    
    NetKnights GmbH
    http://www.netknights.it
    Landgraf-Karl-Str. 19, 34131 Kassel, Germany
    Tel: +49 561 3166797, Fax: +49 561 3166798
    
    Amtsgericht Kassel, HRB 16405
    Geschäftsführer: Cornelius Kölbel
    
    
    --
    You received this message because you are subscribed to a
    topic in the Google Groups "privacyidea" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/privacyidea/b0Qif0oBuWw/unsubscribe.
    To unsubscribe from this group and all its topics, send an
    email to privacyidea+unsubscribe@googlegroups.com.
    To post to this group, send email to
    privacyidea@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/privacyidea/1450677464.3816.87.camel%40puckel.
    For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
@cornelinux
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel

signature.asc (836 Bytes)

Removing

“/usr/local/lib/python2.7/dist-packages/PIL/”

Resolved this; 100% right!

Thanks!On Sun, Dec 20, 2015 at 11:57 PM, Cornelius Kölbel < cornelius.koelbel@netknights.it> wrote:

Hello,

your error message reads:

File “/usr/local/lib/python2.7/dist-packages/PIL/Image.py”, line 401, in
_getencoder
raise IOError(“encoder %s not available” % encoder_name)

But I guess the PIL debian package you installed is located at

/usr/lib/python2.7/dist-packages/PIL/Image.py (without local)

So I assume you have installed PIL manually without zip support.

Check the files in python-pil. I further assume they are not located
in /usr/local/lib/python but in /usr/lib/python.

I then would remove the
directory /usr/local/lib/python2.7/dist-packages/PIL/.

This should do the trick.

Kind regards
Cornelius

Am Sonntag, den 20.12.2015, 20:47 -0800 schrieb pr1m35:

I am running Debian Jessie on two hosts, both of which have
privacyIDEA installed; works perfectly on host A but I get this error
on machine B when I try to enroll a new token “IOError: encoder zip
not available”

I have re-installed Pillow by forcibly removing it as such (dpkg -r
–force-depends “python-pil:amd64”); followed by a re-install (apt-get
install python-pil:amd64) but the results are the same; “encoder zip
not available”

Here is an excerpt from my privacyidea.log

File “/usr/lib/python2.7/dist-packages/privacyidea/api/token.py”,
line 239, in init
init_details = tokenobject.get_init_detail(param, user)
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/log.py”, line
125, in log_wrapper
f_result = func(*args, **kwds)
File
"/usr/lib/python2.7/dist-packages/privacyidea/lib/tokens/hotptoken.py",
line 160, in get_init_detail
response_detail = TokenClass.get_init_detail(self, params, user)
File
"/usr/lib/python2.7/dist-packages/privacyidea/lib/tokenclass.py", line
1078, in get_init_detail
"img": create_img(otpkey, width=200)}
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/utils.py”,
line 56, in create_img
o_data = create_png(data, alt=alt)
File “/usr/lib/python2.7/dist-packages/privacyidea/lib/utils.py”,
line 31, in create_png
img.save(output)
File “/usr/lib/python2.7/dist-packages/qrcode/image/pil.py”, line
32, in save
self._img.save(stream, kind)
File “/usr/local/lib/python2.7/dist-packages/PIL/Image.py”, line
1439, in save
save_handler(self, fp, filename)
File “/usr/local/lib/python2.7/dist-packages/PIL/PngImagePlugin.py”,
line 572, in _save
ImageFile._save(im, _idat(fp, chunk), [(“zip”, (0,0)+im.size, 0,
rawmode)])
File “/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py”, line
481, in _save
e = Image._getencoder(im.mode, e, a, im.encoderconfig)
File “/usr/local/lib/python2.7/dist-packages/PIL/Image.py”, line
401, in _getencoder
raise IOError(“encoder %s not available” % encoder_name)
IOError: encoder zip not available
Enter code here…


You received this message because you are subscribed to the Google
Groups “privacyidea” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/privacyidea/2821018d-8c0d-4800-ad64-2be173b0b194%40googlegroups.com
.

For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
cornelius.koelbel@netknights.it
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel


You received this message because you are subscribed to a topic in the
Google Groups “privacyidea” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/privacyidea/b0Qif0oBuWw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/1450677464.3816.87.camel%40puckel
.
For more options, visit https://groups.google.com/d/optout.