Modify

Opened 14 years ago

Closed 12 years ago

#7450 closed defect (fixed)

Error on Upgrade

Reported by: max@… Owned by: Colin Guthrie
Priority: high Component: ClientsPlugin
Severity: major Keywords:
Cc: Trac Release: 0.12

Description

Hi, I'm having trouble after installing the plugin. When I upgrade the project I'm given the error

Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Python25\Scripts>trac-admin \projects\it upgrade ClientsPlugin needs an upgrade

  • Upgrading db

Creating client table

  • Upgrading reports

AttributeError: 'NoneType' object has no attribute 'rollback'

Any assistance in resolving this issue would be appreciated

Attachments (0)

Change History (5)

comment:1 Changed 14 years ago by Colin Guthrie

Sorry, but I've not yet had time to port any of my plugins to 0.12.

I hope to complete a migration in the next couple months or so, but if you want to beat me to it, then patches are welcome :)

comment:2 Changed 13 years ago by anonymous

I will add this:

>trac-admin d:\trac\think upgrade
ClientsPlugin needs an upgrade
 * Upgrading db
Creating client table
Updating clients table (v3)
Updating clients table (v4)
Updating clients table (v5)
Updating clients table (v6)
 * Upgrading reports
UnboundLocalError: local variable 'version' referenced before assignment

>trac-admin d:\trac\think upgrade
ClientsPlugin needs an upgrade
 * Upgrading db
Creating client table
WorklogPlugin Exception: table client already exists
 * Upgrading reports
UnboundLocalError: local variable 'version' referenced before assignment

>trac-admin d:\trac\think upgrade
ClientsPlugin needs an upgrade
 * Upgrading db
Creating client table
WorklogPlugin Exception: table client already exists
 * Upgrading reports
UnboundLocalError: local variable 'version' referenced before assignment

>trac-admin d:\trac\think upgrade
ClientsPlugin needs an upgrade
 * Upgrading db
Creating client table
WorklogPlugin Exception: table client already exists
 * Upgrading reports
UnboundLocalError: local variable 'version' referenced before assignment

>trac-admin d:\trac\think upgrade
Database is up to date, no upgrade necessary.

comment:3 Changed 12 years ago by yamilchamut@…

I was having the same problem, but I managed to solve it by adding "global version" between lines 21 and 23 on reportmanager.py

Hope it helps!

Y.

comment:4 Changed 12 years ago by Ryan J Ollos

Declaring version outside the try/except statement does fix the issue, but I found it necessary to drop all of the client* tables from the database first.

comment:5 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

(In [11835]) Fixes #7450:

  • Removed rollbacks on db connection.
  • Put version outside the scope of the try/except so that it is in scope long enough to be used. Thanks to yamilchamut@… for the suggestion.

Modify Ticket

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