Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#9179 closed defect (cantfix)

trac-admin hotcopy fails with "NameError: global name 'set' is not defined"

Reported by: justinjschaub@… Owned by:
Priority: normal Milestone:
Component: admin/console Version: 0.11.6
Severity: major Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The failure has occured on both Trac 0.11.7 and Trac 0.11.6. OS: Centos 4.6 Python: 2.3.4-14.4.el4_6.1 Database Backend: sqlite 3.3.6-2

Running trac-admin hotcopy fails with the following error:

Failed to open environment. global name 'set' is not defined
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/Trac-0.11.7-py2.3.egg/trac/admin/console.py", line 177, in env_open
    self.__env = Environment(self.envname)
  File "/usr/lib/python2.3/site-packages/Trac-0.11.7-py2.3.egg/trac/env.py", line 204, in __init__
    load_components(self, plugins_dir and (plugins_dir,))
  File "/usr/lib/python2.3/site-packages/Trac-0.11.7-py2.3.egg/trac/loader.py", line 112, in load_components
    loadfunc(env, search_path, auto_enable=plugins_dir)
  File "/usr/lib/python2.3/site-packages/Trac-0.11.7-py2.3.egg/trac/loader.py", line 68, in _load_eggs
    entry.load(require=True)
  File "/usr/lib/python2.3/site-packages/setuptools-0.6c11-py2.3.egg/pkg_resources.py", line 1954, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.3/site-packages/Trac-0.11.7-py2.3.egg/trac/mimeview/pygments.py", line 35, in ?
    pygments = __import__('pygments', {}, {}, ['lexers', 'styles', 'formatters'])
  File "/usr/lib/python2.3/site-packages/Pygments-1.3-py2.3.egg/pygments/formatters/__init__.py", line 14, in ?
    from pygments.formatters._mapping import FORMATTERS
  File "/usr/lib/python2.3/site-packages/Pygments-1.3-py2.3.egg/pygments/formatters/_mapping.py", line 20, in ?
    from pygments.formatters.html import HtmlFormatter
  File "/usr/lib/python2.3/site-packages/Pygments-1.3-py2.3.egg/pygments/formatters/html.py", line 17, in ?
    from pygments.token import Token, Text, STANDARD_TYPES
  File "/usr/lib/python2.3/site-packages/Pygments-1.3-py2.3.egg/pygments/token.py", line 50, in ?
    Token       = _TokenType()
  File "/usr/lib/python2.3/site-packages/Pygments-1.3-py2.3.egg/pygments/token.py", line 26, in __init__
    self.subtypes = set()
NameError: global name 'set' is not defined

Attachments (0)

Change History (2)

comment:1 by anonymous, 15 years ago

I tried upgrading Pygments using easy_install, and it upgraded to Pygments 1.3.1 and that only made things worse. I then got the same error whenever I browsed to my trac website.

Removing Pygments solved the problem for both my trac website (Apache web server + mod_python) and the trac-admin hotcopy.

easy_install -m Pygments
rm -rf /usr/lib/python2.3/site-packages/Pygments*.egg

The syntax highlighting is still working, so I assume some other highlighter is being used now.

comment:2 by Remy Blank, 15 years ago

Resolution: cantfix
Status: newclosed

The exception is thrown in Pygments. I assume it is not Python 2.3 compatible anymore.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.