trac ticketlog.web_ui error when browsing trac
Question: I am receiving the following errors. i am using trac 0.12 on centos 5. I have
plugins, advancedticketworkflow, ldaplugin, smtpldapemailsender,
tracannouncer, tracwysiwg. i am trying to install commit ticket updater and
similar plugins but they are not showing up. nor is it working.

    
    
    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**

I checked out latest version, when i run setup.py i get the following error

    
    
    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
    


Answer: [TracTicketChangelogPlugin](http://trac-
hacks.org/wiki/TracTicketChangelogPlugin) and
[TracTicketTemplatePlugin](http://trac-
hacks.org/wiki/TracTicketTemplatePlugin) do not support Python 2.4.
TracTicketChangelogPlugin might support Python 2.4 if you install the
`simplejson` package. TracTicketTemplatePlugin utilizes the `with_statement`
so we'll need to add `from __future__ import with_statement` to get it to work
with Python 2.5.

