Modify

Opened 4 years ago

Closed 2 years ago

#7450 closed defect (fixed)

Error on Upgrade

Reported by: max@… Owned by: coling
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 4 years ago by coling

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 3 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 3 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 2 years ago by rjollos

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 2 years ago by rjollos

  • Resolution set to fixed
  • Status changed from new to closed

(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.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coling. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.