Modify

Opened 14 years ago

Closed 14 years ago

#7682 closed defect (fixed)

trac-admin upgrade fails on first install

Reported by: Robert Corsaro Owned by: Martin Scharrer
Priority: normal Component: WatchlistPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.11

Description

Using r8856

Line 175 in db.py is:

!#python
        try:
            return int(valuelist[0])

and should be:

!#python
        try:
            if valuelist:
                return int(valuelist[0])
            return 0

or at least TypeError: 'NoneType' object is unsubscriptable should be caught.

19:28:17 Trac[env] INFO: tracwatchlist.db.WatchlistDataBase upgrading...
TypeError: 'NoneType' object is unsubscriptable
19:28:17 Trac[console] ERROR: Exception in trac-admin command: 
Traceback (most recent call last):
  File "/home/doki_pen/th-announcer/lib/python2.6/site-packages/trac/admin/console.py", line 107, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "/usr/lib/python2.6/cmd.py", line 218, in onecmd
    return self.default(line)
  File "/home/doki_pen/th-announcer/lib/python2.6/site-packages/trac/admin/console.py", line 257, in default
    return cmd_mgr.execute_command(*args)
  File "/home/doki_pen/th-announcer/lib/python2.6/site-packages/trac/admin/api.py", line 123, in execute_command
    return f(*fargs)
  File "/home/doki_pen/th-announcer/lib/python2.6/site-packages/trac/env.py", line 790, in _do_upgrade
    self.env.upgrade(backup=no_backup is None)
  File "/home/doki_pen/th-announcer/lib/python2.6/site-packages/trac/env.py", line 533, in upgrade
    with_transaction(self)(participant.upgrade_environment)
  File "/home/doki_pen/th-announcer/lib/python2.6/site-packages/trac/db/api.py", line 77, in transaction_wrapper
    fn(ldb)
  File "/home/doki_pen/th-announcer/lib/python2.6/site-packages/tracwatchlist/db.py", line 110, in upgrade_environment
    old_version = self.get_version(db)
  File "/home/doki_pen/th-announcer/lib/python2.6/site-packages/tracwatchlist/db.py", line 176, in get_version
    return int(valuelist[0])
TypeError: 'NoneType' object is unsubscriptable

Attachments (0)

Change History (3)

comment:1 Changed 14 years ago by Martin Scharrer

Status: newassigned

Thanks for reporting this. It should be fixed in [8863]. Could you please verify this.

Please also note that the dev branch isn't fully stable at the moment. You might be required to reset all your watched resources and settings when the stable version is released. I actually have to put this on the WatchlistPlugin wiki page.

comment:2 Changed 14 years ago by Robert Corsaro

Yeah, I'll check it out. No worries, about dev stream. It's my dev environment I'm working on.

comment:3 Changed 14 years ago by Robert Corsaro

Resolution: fixed
Status: assignedclosed

Working fine now.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Martin Scharrer.
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.