Question

I get the folowing error when I run bin/buildout. I´ve check this issue here on Plone.org and they say that it ´s not dangerous but they do not say how to resolve it.

I want to skip this error in order to execute bin/buildout withouth errors, til now I´m updating my products manually. How can I solve this?

root@sevilla2:/var/plone/zinstance# bin/buildout 
While:
  Installing.
  Getting section precompile.
  Initializing section precompile.
  Loading zc.buildout recipe entry plone.recipe.precompiler:default.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/var/plone/buildout-cache/eggs/zc.buildout-1.1.2-py2.4.egg/zc/buildout/buildout.py", line 1509, in main
    getattr(buildout, command)(args)
  File "/var/plone/buildout-cache/eggs/zc.buildout-1.1.2-py2.4.egg/zc/buildout/buildout.py", line 357, in install
    [self[part]['recipe'] for part in install_parts]
  File "/var/plone/buildout-cache/eggs/zc.buildout-1.1.2-py2.4.egg/zc/buildout/buildout.py", line 888, in __getitem__
    options._initialize()
  File "/var/plone/buildout-cache/eggs/zc.buildout-1.1.2-py2.4.egg/zc/buildout/buildout.py", line 969, in _initialize
    recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
  File "/var/plone/buildout-cache/eggs/zc.buildout-1.1.2-py2.4.egg/zc/buildout/buildout.py", line 932, in _install_and_load
    return pkg_resources.load_entry_point(
  File "/var/plone/buildout-cache/eggs/setuptools-0.6c9-py2.4.egg/pkg_resources.py", line 277, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/var/plone/buildout-cache/eggs/setuptools-0.6c9-py2.4.egg/pkg_resources.py", line 2180, in load_entry_point
    return ep.load()
  File "/var/plone/buildout-cache/eggs/setuptools-0.6c9-py2.4.egg/pkg_resources.py", line 1913, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/var/plone/buildout-cache/eggs/plone.recipe.precompiler-0.6-py2.4.egg/plone/recipe/precompiler/__init__.py", line 7, in ?
    from pythongettext.msgfmt import Msgfmt
  File "/var/plone/buildout-cache/eggs/python_gettext-2.1-py2.4.egg/pythongettext/msgfmt.py", line 265
     except Exception as msg:
                       ^
 SyntaxError: invalid syntax

I came from a migration of my site (successfully completed but builded without buildout)

  • Plone 3.2.3
  • CMF 2.1.2 Zope (Zope 2.10.7-final, python 2.4.5, linux2)
  • Python 2.4.5 [GCC 4.4.5]
  • PIL 1.1.6
Was it helpful?

Solution

You'll need to pin python-gettext to use a version before version 2.0. That version introduced syntax that requires Python 2.6 or newer (to make the package work on Python 3 as well).

In your buildout versions section, add:

python-gettext = 1.2
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top