Opened 6 months ago

Closed 4 months ago

#13752 closed defect (fixed)

initial database upgrade fails because of empty custom_report table

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: ClientsPlugin
Severity: normal Keywords:
Cc: Trac Release:


On initial activation/installation of the Clients plugin the following error occurs on "trac-admin upgrade":

2020-02-23 14:42:21,813 Trac[console] ERROR: Exception in trac-admin command: u'upgrade'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/trac/admin/", line 83, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "/usr/local/lib/python2.7/", line 220, in onecmd
    return self.default(line)
  File "/usr/local/lib/python2.7/site-packages/trac/admin/", line 252, in default
    return self.cmd_mgr.execute_command(*args)
  File "/usr/local/lib/python2.7/site-packages/trac/admin/", line 135, in execute_command
    return f(*fargs)
  File "/usr/local/lib/python2.7/site-packages/trac/", line 1062, in _do_upgrade
    self.env.upgrade(backup=no_backup is None)
  File "/usr/local/lib/python2.7/site-packages/trac/", line 787, in upgrade
  File "/usr/local/lib/python2.7/site-packages/clients/", line 238, in upgrade_environment
  File "/usr/local/lib/python2.7/site-packages/clients/", line 190, in do_reports_upgrade
  File "/usr/local/lib/python2.7/site-packages/clients/", line 84, in add_report
    ordering = int(ordering) + 1
TypeError: int() argument must be a string or a number, not 'NoneType'

This issue is fixed by the attached patch.

Attachments (1)

fix_reportmanager_empty_table.diff (1.2 KB) - added by anonymous 6 months ago.

Download all attachments as: .zip

Change History (3)

Changed 6 months ago by anonymous

comment:1 Changed 5 months ago by Ryan J Ollos

Owner: set to Ryan J Ollos
Status: newaccepted

comment:2 Changed 4 months ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 17704:

TracClients 0.5dev: Fix failure in db upgrade

Fixes #13752.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.