Comments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #3968 (new defect)

Opened 4 years ago

initenv fails when ticket moderator is enabled in template

Reported by: Richard Rogers <rprogers@…> Owned by: jdsiiro
Priority: normal Milestone:
Component: TracTicketModerator Version:
Keywords: Cc:


If I do trac-admin environment initenv --inherit=template.ini ... with

ticketmoderator.api.ticketmoderator = enabled
ticketmoderator.web_ui.ticketmoderatormodule = enabled

in the template.ini file, I get the following error:

Initenv for '/var/trac/environments/bar' failed. 
Failed to create environment.
global name 'db' is not defined
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/admin/", line 460, in do_initenv
  File "build/bdist.linux-x86_64/egg/trac/", line 124, in __call__
    self.__init__(*args, **kwargs)
  File "build/bdist.linux-x86_64/egg/trac/", line 288, in __init__
  File "/usr/lib64/python2.7/site-packages/TracTicketModerator-0.6.4-py2.7.egg/ticketmoderator/", line 246, in environment_created
    cursor = db.cursor()
NameError: global name 'db' is not defined

It seems to work OK if I initenv without the TracTicketModerator and then enable & upgrade later. This is with Trac 1.0.2, TracTicketModerator-0.6.4-py2.7, and MySQL.



Add a comment

Modify Ticket

Change Properties
<Author field>
as new

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.