Modify

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#11332 closed defect (duplicate)

Unable to upgrade trac 1.0.1 database

Reported by: roger@… Owned by: Martin Scharrer
Priority: normal Component: WatchlistPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

I just installed the plugin on a Trac 1.0.1 system.

easy_install TracWatchlistPlugin

When I try to update the database, I get this:

# trac-admin /vol1/trac/systems upgrade

The upgrade failed. Please fix the issue and try again.

OperationalError: table watchlist_new has 4 columns but 3 values were supplied

Does this plugin work with Trac 1.0.1?

Attachments (0)

Change History (10)

comment:1 Changed 11 years ago by Martin Scharrer

The WatchlistPlugin was written with Trac 0.11 and 0.12 and wasn't updated since. So 1.0.1 isn't activly supported. What DB backend are you using?

comment:2 Changed 11 years ago by Ryan J Ollos

Resolution: duplicate
Status: newclosed

Duplicate of #10054. I'll add some comments to that ticket.

comment:3 Changed 11 years ago by Ryan J Ollos

Resolution: duplicate
Status: closedreopened

Well, maybe not a duplicate since #10054 is running Trac 0.12.1.

At first I suspected this may be due to how the plugin is checking for table existence, which doesn't work in Trac 1.0 and later. hasienda and jun66j5 have worked out a good cross-db solution for that issue, see #9521.

However, if the issue is the same as that reported in #10054, then that probably is not the issue.

comment:4 Changed 11 years ago by roger@…

The default mysql.

Any plans to support 1.0.1? I think the features this plug-in offers would make many of our users happier with our system.

comment:5 Changed 11 years ago by anonymous

Yikes! I answered wrong! I means SQLite!

comment:6 Changed 10 years ago by paul.jendrowski@…

The OperationalError: table watchlist_new has 4 columns but 3 values were supplied error is because the old version of the plugin and the new version have different table structures as reported in #10054 (I opened that ticket). I tried a clean install of the plugin on a new Trac 1.0.1 project. When I run trac-admin upgrade, I get an error of just Error: AttributeError: , nothing else. No watchlist tables are created (using sqlite db).

Running this for an enterprise and have multiple projects that are already using watchlist. We need to upgrade to Trac 1.0.1 so we really would like watchlist to be upgraded to work with the latest version of Trac.

I'd be willing to help get this working. I know python, but not much about Trac architecture so would need some guidance.

Last edited 10 years ago by Ryan J Ollos (previous) (diff)

comment:7 Changed 10 years ago by Ryan J Ollos

With the changes committed to #10423 just now, the plugin should work for new installations on Trac 1.0 and later. It sounds like there may still be an issue when upgrading from an older version. Let me know if you find any hints as to what the issue might be there.

comment:8 Changed 10 years ago by paresh138@…

I just tried to install this plugin using the same command as the original poster above.

The installation completed without any error, but when I enabled the plugin I didn't get the expected upgrade environment message, but looking at the logs, I saw this

2014-10-17 21:59:39,311 Trac[env] ERROR: Exception caught while checking for upgrade: 
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/env.py", line 837, in open_environment
    needs_upgrade = env.needs_upgrade()
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/env.py", line 670, in needs_upgrade
    if participant.environment_needs_upgrade(db):
  File "/usr/local/lib/python2.7/dist-packages/TracWatchlistPlugin-1.0-py2.7.egg/tracwatchlist/db.py", line 72, in environment_needs_upgrade
    if not self.watchlist_table_exists(db):
  File "/usr/local/lib/python2.7/dist-packages/TracWatchlistPlugin-1.0-py2.7.egg/tracwatchlist/db.py", line 231, in watchlist_table_exists
    db.rollback()
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/db/util.py", line 107, in __getattr__
    raise AttributeError
AttributeError: 
2014-10-17 21:59:39,312 Trac[env] WARNING: base_url option not set in configuration, generated links may be incorrect

Attempting to upgrade simply shows Error: AttributeError: without any error in the log file.

This is a new installation of Trac and I have checked that the 'watchlist' table does not exist.

I am running with MySQL.

Please advise if you need more info.

comment:9 in reply to:  8 Changed 10 years ago by Ryan J Ollos

Resolution: duplicate
Status: reopenedclosed

Replying to paresh138@…:

I just tried to install this plugin using the same command as the original poster above.

Which branch did you install from? After [14022] this issue should be fixed on branch watchlistplugin/0.12 and the plugin should work with Trac 1.0. Please reopen #10423 if that's not the case.

The issue reported in comment:description is a duplicate of #10054.

comment:10 in reply to:  6 Changed 10 years ago by Ryan J Ollos

Replying to paul.jendrowski@…:

I'd be willing to help get this working. I know python, but not much about Trac architecture so would need some guidance.

If you are still stuck on the issue, let's discuss further in #10054. I'd gladly accept your offer to help get this working and could help you work through the issues.

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.