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

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:

Description

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

[components]
...
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/console.py", line 460, in do_initenv
    options=options)
  File "build/bdist.linux-x86_64/egg/trac/core.py", line 124, in __call__
    self.__init__(*args, **kwargs)
  File "build/bdist.linux-x86_64/egg/trac/env.py", line 288, in __init__
    setup_participant.environment_created()
  File "/usr/lib64/python2.7/site-packages/TracTicketModerator-0.6.4-py2.7.egg/ticketmoderator/api.py", 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.

Attachments

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
Author


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

 
Note: See TracTickets for help on using tickets.