plone - 在 Plone 3.2.3 上运行 bin/buildout 时出现语法错误

标签 plone zope buildout

运行 bin/buildout 时出现以下错误。 我已经检查过这个问题here在 Plone.org 上,他们说这并不危险 但他们没有说如何解决。

我想跳过此错误以便执行 bin/buildout 而不会出现错误,直到现在我正在手动更新我的产品。我该如何解决这个问题?

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

我来自网站迁移(已成功完成,但构建时未进行扩建)

  • 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

最佳答案

您需要固定 python-gettext 才能使用 2.0 版之前的版本。该版本引入了需要 Python 2.6 或更高版本的语法(以使该包也可以在 Python 3 上运行)。

在构建版本部分中,添加:

python-gettext = 1.2

关于plone - 在 Plone 3.2.3 上运行 bin/buildout 时出现语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18983991/

相关文章:

plone - Diazo:css:if-content 和 css:if-not-content 都匹配

python - 旧 Plone 产品的自动化蛋化

plone - 如何将注释与 z3c.form 的 DictionaryField 一起使用

python - 构建和 ​​Pythonbrew

plone - 委派 Plone 管理用户和内容的本地角色

javascript - 使用 Plone 添加/编辑弹出窗口

python - 如何使用 ZPT 检查它是否是 Plone 网站中的主页?

zope - 如何在 ZODB 中实现持久列表或持久映射

python - 如何指定在哪里放置 buildout bootstrap 生成的文件夹?

python - 当 Codespeak.net 关闭时安装 lxml