Modify

Opened 7 years ago

Closed 6 years ago

#2469 closed defect (fixed)

announcerplugin does not work

Reported by: hacker.christian@… Owned by: ixokai
Priority: normal Component: AnnouncerPlugin
Severity: blocker Keywords:
Cc: davidf@… Trac Release: 0.11

Description

Error description

After the installation of the announcerplugin revision 3130 and the restart of the webserver the following error is displayed when trying to load trac in a browser:

Trac Error

TracError: The Trac Environment needs to be upgraded.

Run "trac-admin c:/trac_projekte\testtrac upgrade"

The corresponding warning in the log file goes like this:

Trac[env] WARNING: Component <announcerplugin.api.AnnouncementSystem object at 0x06BFEAF0> requires environment upgrade

OK -> Try to upgrade trac. The result can be viewed here:

c:\>trac-admin c:/trac_projekte\testtrac upgrade --no-backup
Command failed: Parent module 'announcerplugin' not loaded

Any ideas?

Trac Server - system information

Operating systemWindows 2003 Server
Trac0.11b1
Python2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
setuptools0.6c7
MySQLserver: "5.0.45-community-nt", client: "5.0.27", thread-safe: 1
MySQLdb1.2.2
Genshi0.4.4
Pygments0.8.1
Subversion1.4.6 (r28521)
jQuery1.2.1


trac.ini

[components]
announcerplugin.* = enabled

[announcer]
admit_domains =
always_notify_owner = true
always_notify_reporter = false
always_notify_updater = false
ignore_domains =
mime_encoding = base64
smtp_always_bcc =
smtp_always_cc =
smtp_default_domain =
smtp_enabled = false
smtp_from = trac@localhost
smtp_from_name =
smtp_password =
smtp_port = 25
smtp_replyto = trac@localhost
smtp_server = localhost
smtp_subject_prefix = default
smtp_user =
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = false
use_short_addr = false
use_tls = false

Attachments (1)

normal-databasemanager-import.patch (640 bytes) - added by davidf@… 7 years ago.
Import trac.db.DatabaseManager normally, not only when upgrading

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by ixokai

The first two are expected and normal; the last odd. Turn logging to DEBUG and see what it says?

comment:2 Changed 7 years ago by davidf@…

  • Cc davidf@… added; anonymous removed

I got this as well. After some debugging it turns out that the from trac.db import DatabaseManager in the _upgrade_db method in announcer/api.py triggers this. Replacing this with a normal import fixes it. I'll attach a brief patch (since we're already importing stuff from trac.db this shouldn't materially affect the operation)

Changed 7 years ago by davidf@…

Import trac.db.DatabaseManager normally, not only when upgrading

comment:3 Changed 7 years ago by kelvin@…

I've tried to install the egg without the patch and it failed, I was getting the error "Command failed: Parent Module 'Announcer Plugin' not loaded".

Next I tried David's patch and it worked like a charm!

Please consider adding this patch to the repository!

Kelvin

comment:4 Changed 6 years ago by doki_pen

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

accepted. thanks! r4032

Add Comment

Modify Ticket

Action
as closed The owner will remain ixokai.
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.