#12612 closed defect (cantfix)
"trac-admin [project base] upgrade" fails due to "TypeError: environment_needs_upgrade() takes exactly 2 arguments (1 given)"
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | 1.3dev |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
After installing 1.3.1dev 1.1.5 over a1caf58 and restarting the tracd standalone instance, the web frontend displays
Error TracError: The Trac Environment needs to be upgraded. Run "trac-admin /var/lib/trac/sci-d-wiki upgrade"
and running sudo trac-admin /var/lib/trac/sci-d-wiki upgrade fails due to
The upgrade failed. Please fix the issue and try again. TypeError: environment_needs_upgrade() takes exactly 2 arguments (1 given)
/var/lib/trac/sci-d-wiki/log/trac.log reveals
2016-10-23 13:51:31,806 Trac[api] INFO: Need to upgrade database_version from 40 to 42
2016-10-23 13:51:31,806 Trac[env] WARNING: Component <Component trac.env.EnvironmentSetup> requires environment upgrade
2016-10-23 13:51:31,807 Trac[api] INFO: Need to upgrade database_version from 40 to 42
2016-10-23 13:51:31,807 Trac[env] WARNING: Component <Component trac.env.EnvironmentSetup> requires environment upgrade
2016-10-23 13:51:31,807 Trac[api] INFO: Need to upgrade database_version from 40 to 42
2016-10-23 13:51:31,809 Trac[console] ERROR: Exception in trac-admin command: u'upgrade'
Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/trac/admin/console.py", line 112, in onecmd
rv = cmd.Cmd.onecmd(self, line) or 0
File "/usr/lib/python2.7/cmd.py", line 220, in onecmd
return self.default(line)
File "build/bdist.linux-x86_64/egg/trac/admin/console.py", line 291, in default
return self.cmd_mgr.execute_command(*args)
File "build/bdist.linux-x86_64/egg/trac/admin/api.py", line 127, in execute_command
return f(*fargs)
File "build/bdist.linux-x86_64/egg/trac/env.py", line 945, in _do_upgrade
self.env.upgrade(backup=no_backup is None)
File "build/bdist.linux-x86_64/egg/trac/env.py", line 691, in upgrade
if participant.environment_needs_upgrade():
TypeError: environment_needs_upgrade() takes exactly 2 arguments (1 given)
Attachments (0)
Change History (9)
comment:1 by , 9 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 9 years ago
comment:3 by , 9 years ago
| Description: | modified (diff) |
|---|---|
| Version: | 1.2dev → 1.3dev |
comment:4 by , 9 years ago
| Description: | modified (diff) |
|---|
comment:5 by , 9 years ago
| Description: | modified (diff) |
|---|
comment:6 by , 9 years ago
API changes in 1.3, the db parameter has been removed from IEnvironmentSetupParticipant.environment_needs_upgrade() in [14888].
comment:7 by , 9 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
I confirmed trac-admin upgrade with Trac environment works well from 1.1.5 to 1.3.1dev.
comment:8 by , 9 years ago
I had trac and trac- packages installed in Ubuntu 16.10 as well. Removing them makes trac-admin upgrade work again.



I guess your installed plugin(s) lead it. Please re-try after plugins are disabled/uninstalled.