浏览trac时trac ticket log.web ui错误

时间:2014-06-06 16:40:30

标签: trac

我收到以下错误。我在centos 5上使用trac 0.12。我有插件,advancedticketworkflow,ldaplugin,smtpldapemailsender,tracannouncer,tracwysiwg。我正在尝试安装提交票据更新程序和类似的插件,但他们没有出现。它也不起作用。

rac[paradox:loader] ERROR: Skipping "ticketlog = ticketlog.web_ui": 
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.12.5-py2.4.egg/trac/loader.py", line 68, in _load_eggs
    entry.load(require=True)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/pkg_resources.py", line 1954, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.4/site-packages/TracTicketChangelogPlugin-0.1-py2.4.egg/ticketlog/web_ui.py", line 45, in ?
    import json as simplejson
ImportError: No module named json
Trac[paradox:loader] ERROR: Skipping "tickettemplate = tickettemplate.ttadmin": 
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.12.5-py2.4.egg/trac/loader.py", line 68, in _load_eggs
    entry.load(require=True)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/pkg_resources.py", line 1954, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.4/site-packages/TracTicketTemplate-0.7-py2.4.egg/tickettemplate/ttadmin.py", line 213
     with open(json_template_file) as f:
             ^
SyntaxError: invalid syntax (ttadmin.py, line 213)
Trac[paradox:loader] ERROR: Skipping "tickettemplate = tickettemplate.ttadmin": 
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.12.5-py2.4.egg/trac/loader.py", line 68, in _load_eggs
    entry.load(require=True)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/pkg_resources.py", line 1954, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.4/site-packages/TracTicketTemplate-0.7-py2.4.egg/tickettemplate/ttadmin.py", line 213
     with open(json_template_file) as f:
             ^
SyntaxError: invalid syntax (ttadmin.py, line 213)

更新

我检查了最新版本,当我运行setup.py时出现以下错误

python setup.py
  File "setup.py", line 55
    install_requires=['simple_json' if sys.version_info < (2, 6) else ''],
                                     ^
SyntaxError: invalid syntax


rpm -qa | grep -i python
python-2.4.3-19.el5
dbus-python-0.70-7.el5
python-sqlite2-2.6.3-1.el5.rf
python-iniparse-0.2.3-6.el5
libxml2-python-2.6.26-2.1.2
python-sqlite-1.1.7-1.2.1
python-elementtree-1.2.6-5
mod_python-3.2.8-3.1
MySQL-python-1.2.1-1
python-ldap-2.2.0-2.1
libselinux-python-1.33.4-2.el5
audit-libs-python-1.3.1-1.el5
rpm-python-4.4.2-37.el5
python-devel-2.4.3-19.el5
python-simplejson-2.0.9-8.el5
python-urlgrabber-3.1.0-2
postgresql-python-8.1.9-1.el5
python-json-3.4-3.el5

1 个答案:

答案 0 :(得分:2)

TracTicketChangelogPluginTracTicketTemplatePlugin不支持Python 2.4。如果您安装simplejson包,TracTicketChangelogPlugin可能会支持Python 2.4。 TracTicketTemplatePlugin使用with_statement,因此我们需要添加from __future__ import with_statement才能使其与Python 2.5一起使用。