Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#12612 closed defect (cantfix)

"trac-admin [project base] upgrade" fails due to "TypeError: environment_needs_upgrade() takes exactly 2 arguments (1 given)"

Reported by: krichter@… 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 krichter@…)

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 anonymous, 7 years ago

Description: modified (diff)

comment:2 by Jun Omae, 7 years ago

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

comment:3 by Jun Omae, 7 years ago

Description: modified (diff)
Version: 1.2dev1.3dev

comment:4 by Jun Omae, 7 years ago

Description: modified (diff)

comment:5 by krichter@…, 7 years ago

Description: modified (diff)

comment:6 by Jun Omae, 7 years ago

API changes in 1.3, the db parameter has been removed from IEnvironmentSetupParticipant.environment_needs_upgrade() in [14888].

comment:7 by Jun Omae, 7 years ago

Resolution: worksforme
Status: newclosed

I confirmed trac-admin upgrade with Trac environment works well from 1.1.5 to 1.3.1dev.

comment:8 by Kalle Richter <krichter@…>, 7 years ago

I had trac and trac- packages installed in Ubuntu 16.10 as well. Removing them makes trac-admin upgrade work again.

comment:9 by Jun Omae, 7 years ago

Resolution: worksformecantfix

That's an InstallationIssue.

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.