Error on Plone - creating site

Hi,

i install FreeBSD 11 and migrate Plone 4 from FreeBSD 10.1. Unfortunately i'm having problems.

When i try to create a new site an error appear: "IOError: decoder jpeg not available."

I installed the following packages, but doesn't work:

py27-pillow-3.4.2
py27-setuptools27-23.1.0
py27-simplejson-3.8.2
py27-tkinter-2.7.13_6
python27-2.7.12
jpeg-8_7

I appreciate any help

thanks!

Are the underlaying -devel packages installed? In particular the one for libjpeg?

-aj

Hi...

i'm using FreeBSD 11. I don't have this package libjpeg-devel. I'm looking for an similar, but i not found yet.

thanks

Fred

You'll definitely need to find or build the missing required packages.

It's important to give us the full error message, as well as any specific buildout.cfg and versions.cfg.

Isn't FreeBSD compiling things from source? It could be that the order in which you install your packages is important in that case. If you first install py27-pillow-3.4.2 without jpeg-8_7 present, it's possible that Pillow (the python library providing image scale services) is compiled without jpeg support. If you install jpeg later, (and support devel packages for that library if they're not bundled in the same package) you'll have to uninstall/reinstall Pillow.

ok..i will check my p27-pillow... At the moment, i'm compiling freebsd sources for stable version.

But, talking about with a friend, the jpeg support seems to exist. So, it's possible something is broken in FreeBSD.

I will try analyze p27-pillow too....

thanks

-Fred

Hello Mr. Nguyen,

i try to rebuild FreeBSD, but doesn't work for me. So, i try to install py-pillow, but doesn't work too.

The error message can be visualized here: http://pastebin.com/GD08Zbz7

My installed packages:

jpeg-turbo-1.5.1               SIMD-accelerated JPEG codec which replaces libjpeg
libjpeg-turbo-1.5.1            SIMD-accelerated JPEG codec library, provides libTurboJPEG
openjpeg-2.1.2_1               Open-source JPEG 2000 codec
giflib-5.1.4                   Tools and library routines for working with GIF images
jbigkit-2.1_1                  Lossless compression for bi-level images such as scanned pages, faxes
png-1.6.27                     Library for manipulating PNG images
py27-imagesize-0.7.1           Python image size library
tiff-4.0.7_1                   Tools and library routines for working with TIFF images
webp-0.5.2                     Google WebP image format conversion tool
py27-pillow-3.4.2              Fork of the Python Imaging Library (PIL)

##versions.cfg:

[versions]
# Itens aqui serao removidos quando de um novo release do Portal Padrao
collective.cover = 1.0a9
collective.polls = 1.6.2

## buildout.cfg:

[buildout]
extends =
    production.cfg

[hosts]
instance = 10.1.1.2

[ports]
instance = 9080

[users]
os = plonegov_buildout

##production.cfg:
[buildout]
extends =
    buildout.d/base.cfg
    buildout.d/use-zeo.cfg
    buildout.d/maintenance.cfg

parts +=
#    zhw
    instance1
    instance2
    haproxy-build
    haproxy-conf
    zeo
    supervisor

[zhw]
recipe = zc.recipe.egg
eggs = ZopeHealthWatcher
scripts = zope_health_watcher

[instance]
http-address = ${hosts:instance}:${ports:instance}
port-base = 1
zodb-cache-size = 80000
debug-mode = off
zserver-threads = 2
effective-user = ${users:os}

[instance1]
<=instance
port-base=1

[instance2]
<=instance
port-base=2

[haproxy-build]
recipe = plone.recipe.haproxy
url = http://dist.plone.org/thirdparty/haproxy-1.4.8.zip
target = freebsd

[haproxy-conf]
recipe = collective.recipe.template
input = ${buildout:directory}/etc/templates/haproxy.conf.in
output = ${buildout:directory}/etc/haproxy.conf
maxconn = 24000
ulimit-n = 65536
user = ${users:os}
group = ${users:os}
bind = ${hosts:haproxy}:${ports:haproxy}

[supervisor]
recipe = collective.recipe.supervisor
plugins =
    supervisor>2.1
    superlance
port = ${ports:supervisor}
user = ${supervisor-settings:user}
password = ${supervisor-settings:password}
serverurl = http://${hosts:supervisor}:${ports:supervisor}
programs =
    10 zeo  (autostart=true  startsecs=10)  ${zeo:location}/bin/runzeo  true  ${users:os}
   20 haproxy  (autostart=true  startsecs=35)  ${buildout:directory}/bin/haproxy [ -f ${buildout:directory}/etc/haproxy.conf -db ]${users:os}
    20 instance1  (autostart=true  startsecs=30)  ${buildout:directory}/bin/instance1 [console]  true  ${users:os}
    20 instance2  (autostart=true  startsecs=30)  ${buildout:directory}/bin/instance2 [console]  true  ${users:os}

logfile = ${buildout:directory}/var/log/supervisord.log
logfile_maxbytes = 5MB
logfile_backups = 10
loglevel = info
pidfile = ${buildout:directory}/var/supervisord.pid
nodaemon = false

Thanks for any help

-Fred

The relevant part out of the huge pastebin is:

2017-02-21T13:00:17 ERROR root could not scale "<plone.namedfile.file.NamedBlobImage object at 0x820204668>" of 'http://x.y.z.k:8080/teste/eventos/brasao.jpg'
Traceback (most recent call last):
  File "/usr/local/Plone/plonegov/eggs/plone.namedfile-2.0.5-py2.7.egg/plone/namedfile/scaling.py", line 256, in create
    **parameters)
  File "build/bdist.freebsd-10.1-RELEASE-amd64/egg/plone/scale/scale.py", line 43, in scaleImage
    image.save(result, format, quality=quality, optimize=True, progressive=True)
  File "build/bdist.freebsd-11.0-RELEASE-p2-amd64/egg/PIL/Image.py", line 1433, in save
    self.load()
  File "build/bdist.freebsd-11.0-RELEASE-p2-amd64/egg/PIL/ImageFile.py", line 191, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "build/bdist.freebsd-11.0-RELEASE-p2-amd64/egg/PIL/Image.py", line 392, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available

Which means that your PIL (Pillow) library in build/bdist.freebsd-11.0-RELEASE-p2-amd64/egg/PIL is still not capable to load jpeg files. This is indeed a Python/FreeBSD specific problem, not a Plone one.

My FreeBSD knowledge is a bit aged (last time I used it >12years ago). I would say there was some problem while building the package from the sources.

Specifically PIL/Pillow contains only the features where it has libraries available at build/compile time. It do not complain if a feature is missing, but then you can not load the file type.

You may ask at Pillow or FreeBSD forums/mailing lists for more specific information unless someone with more knowledge pops up here.

Hi...

i solved the problem through downgrade from FreeBSD 11 to FreeBSD 10.3. The package py-pillow in FreeBSD 11 has some problem. Something seems broken. So, when i installed 10.3 worked fine.

Thanks a lot.

  • Fred
1 Like