Ticket #8062 (new defect)

Opened 2 years ago

Last modified 6 months ago

Database upgrade silently fails when no i18n is available

Reported by: dbely Assigned to: doki_pen
Priority: normal Component: AnnouncerPlugin
Severity: critical Keywords:
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

api.py.diff (466 bytes) - added by dbely on 11/16/10 15:24:47.

Change History

11/16/10 15:24:47 changed by dbely

  • attachment api.py.diff added.

11/16/10 15:26:43 changed by dbely

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

11/15/11 16:56:56 changed 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.


Add/Change #8062 (Database upgrade silently fails when no i18n is available)




Change Properties
Action