Modify ↓
Opened 17 years ago
Closed 17 years ago
#4170 closed defect (worksforme)
Environment upgrade doesn't work for first installation - NameError: global name 'ENV' is not defined
| Reported by: | nicholas | Owned by: | Richard Liao |
|---|---|---|---|
| Priority: | normal | Component: | TracTicketTemplatePlugin |
| Severity: | blocker | Keywords: | |
| Cc: | Trac Release: | 0.11 |
Description
Using source:tractickettemplateplugin/0.11@4553
Migrate from template files to db.
Traceback (most recent call last):
File "/usr/bin/trac-admin", line 8, in <module>
load_entry_point('Trac==0.11rc2', 'console_scripts', 'trac-admin')()
File "/usr/lib/python2.5/site-packages/Trac-0.11rc2-py2.5.egg/trac/admin/console.py", line 1249, in run
return admin.onecmd(command)
File "/usr/lib/python2.5/site-packages/Trac-0.11rc2-py2.5.egg/trac/admin/console.py", line 104, in onecmd
rv = cmd.Cmd.onecmd(self, line) or 0
File "/usr/lib/python2.5/cmd.py", line 219, in onecmd
return func(arg)
File "/usr/lib/python2.5/site-packages/Trac-0.11rc2-py2.5.egg/trac/admin/console.py", line 1108, in do_upgrade
self.__env.upgrade(backup=do_backup)
File "/usr/lib/python2.5/site-packages/Trac-0.11rc2-py2.5.egg/trac/env.py", line 442, in upgrade
participant.upgrade_environment(db)
File "build/bdist.linux-i686/egg/tickettemplate/ttadmin.py", line 102, in upgrade_environment
File "build/bdist.linux-i686/egg/tickettemplate/upgrades.py", line 30, in add_tt_table
File "build/bdist.linux-i686/egg/tickettemplate/upgrades.py", line 96, in _findAllTmpls
NameError: global name 'ENV' is not defined
Attachments (0)
Change History (3)
comment:1 follow-up: 2 Changed 17 years ago by
comment:2 Changed 17 years ago by
| Status: | new → assigned |
|---|
- fixed
Replying to nicholas:
I tried adding a "global ENV" at the top of add_tt_table(), but the second "trac-admin upgrade" said that no upgrade was required.
You have to fixed this problem in trac's database manually.
1. delete from system where name = 'tt_version' 2. drop table tt_template 3. drop table tt_custom
Hope this helps.
comment:3 Changed 17 years ago by
| Resolution: | → worksforme |
|---|---|
| Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.



I tried adding a "global ENV" at the top of add_tt_table(), but the second "trac-admin upgrade" said that no upgrade was required.