0
我收到以下錯誤。我使用Trac 0.12在centos 5.我有插件,advancedticketworkflow,ldaplugin,smtpldapemailsender,tracannouncer,tracwysiwg。我試圖安裝提交票更新和類似的插件,但他們沒有顯示出來。它也不工作。trac ticketlog.web_ui在瀏覽trac時出錯
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)
UPDATE
我檢查了最新的版本,當我運行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
您可以嘗試最新版本的[TracTicketChangelogPlugin](http://trac-hacks.org/wiki/TracTicketChangelogPlugin),今天已經提交了一些修復程序。它應該自動安裝'simplejson'。我還沒有用Python 2.4測試過,但到目前爲止,我沒有看到任何會阻止它與Python 2.4一起工作的東西。如果您對最新版本的插件加載有任何問題,請重新發布日誌,然後我會看到修復它。 – RjOllos
我安裝了simpejson和json,其中已安裝但已更新。錯誤時,但我不認爲chnagleog工作 – shorif2000
我已更新我的問題 – shorif2000