Modify

Opened 4 years ago

Last modified 23 months ago

#8062 new defect

Database upgrade silently fails when no i18n is available

Reported by: dbely Owned by: hasienda
Priority: normal Component: AnnouncerPlugin
Severity: critical Keywords: i18n
Cc: Trac Release: 0.12

Description

trac-admin </path/to/projenv> upgrade

outputs

Database is up to date, no upgrade necessary.

But actually there was an error:

2010-11-16 17:07:46,643 Trac[loader] ERROR: Skipping "announcer.api = announcer.api":
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/trac/loader.py", line 70, in _load_eggs
    entry.load(require=True)
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1948, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/api.py", line 393, in <module>
    domain_functions('announcer', ('_', 'tag_', 'N_', 'add_domain'))
ValueError: need more than 1 value to unpack)

and the database is not upgraded. Due to the same bug an attempt to open Administration->Plugins would fail with "Internal Server Error"

The attached patch is my quick and dirty attempt to fix the problem.

Attachments (1)

api.py.diff (466 bytes) - added by dbely 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by dbely

comment:1 Changed 4 years ago by dbely

  • Summary changed from Database upgrade silently fails when no i10n is available to Database upgrade silently fails when no i18n is available

comment:2 Changed 3 years ago by hasienda

(In [10920]) AnnouncerPlugin: Refactor i18n in a more compatible way, refs #7314, #7666, #7380, #8062 and #9192.

Lessons learned meanwhile with other plugins, so the code applied here has
actually been tested and proven to work. This reverts [8409] effectively,
but let's keep proper Babel and Trac versions for i18n explicitly as an extra.

After these changes the plugin finally loads cleanly in Trac 0.11 again.

comment:3 Changed 23 months ago by hasienda

  • Keywords i18n added
  • Owner changed from doki_pen to hasienda

Seems like the fix did it and holds even for Trac-1.0 (tested now).

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.