trac-admin抛出Traceback错误

时间:2014-12-13 02:09:52

标签: python trac

我已经使用以下命令在Ubuntu 14.04.1上安装了Trac:

$ sudo apt-get install trac trac-accountmanager trac-graphviz trac-icalviewplugin trac- 
mastertickets trac-wysiwyg trac-wikitablemacro trac-tags trac-customfieldadmin trac- 
datefieldplugin

我相信已经安装了Trac 1.0.1-2,但是当我运行一个简单的命令时,例如:

$ sudo trac-admin --version

我得到以下追踪:

Traceback (most recent call last):
  File "/usr/bin/trac-admin", line 9, in <module>
    load_entry_point('Trac==1.0.1', 'console_scripts', 'trac-admin')()
  File "/usr/lib/python2.7/dist-packages/trac/admin/console.py", line 567, in run
    translation.activate(locale)
  File "/usr/lib/python2.7/dist-packages/trac/util/translation.py", line 325, in activate
    translations.activate(locale, env_path)
  File "/usr/lib/python2.7/dist-packages/trac/util/translation.py", line 152, in activate
    t.add(Translations.load(locale_dir, locale or 'en_US',
AttributeError: 'NullTranslations' object has no attribute 'add'

我对python不熟悉,任何有关为什么会发生这种情况的想法都会受到赞赏。

1 个答案:

答案 0 :(得分:1)

要解决此问题,您可以升级到Trac 1.0.2,或降级到Babel 0.9.6。有关详细信息,请参阅comment:1:ticket:11621