Opened 5 years ago

Closed 7 weeks ago

Last modified 7 weeks ago

#9206 closed defect (fixed)

[PATCH] AttributeError: 'XmppPreferencePanel' object has no attribute 'xmpp_format_setting'

Reported by: jun66j5 Owned by: jun66j5
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords: i18n
Cc: rjollos, doki_pen Trac Release: 0.12


I'm working Japanese translations for the AnnouncerPlugin. While working, the following error occurs when visiting /prefs/announcer page.

2011-09-25 20:53:43,117 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "/home/jun66j5/venv/trac-0.12/lib/python2.4/site-packages/trac/web/", line 522, in _dispatch_request
  File "/home/jun66j5/venv/trac-0.12/lib/python2.4/site-packages/trac/web/", line 243, in dispatch
    resp = chosen_handler.process_request(req)
  File "/home/jun66j5/venv/trac-0.12/lib/python2.4/site-packages/trac/prefs/", line 77, in process_request
    template, data = chosen_provider.render_preference_panel(req, panel_id)
  File "/home/jun66j5/src/trac/announcerplugin/announcer/", line 92, in render_preference_panel
    for name, label, template, data in self._get_boxes(req):
  File "/home/jun66j5/src/trac/announcerplugin/announcer/", line 86, in _get_boxes
    yield ((boxname, boxlabel) +
  File "/home/jun66j5/src/trac/announcerplugin/announcer/distributors/", line 254, in render_announcement_preference_box
AttributeError: 'XmppPreferencePanel' object has no attribute 'xmpp_format_setting'

XmppDistributor module has xmpp_format_setting attrubute, I think that it should be as the following patch.

  • announcer/distributors/

    diff --git a/announcer/distributors/ b/announcer/distributors/
    index 3cf9f3f..55ed788 100644
    a b class XmppPreferencePanel(Component): 
    251251        for realm in supported_realms:
    252252            name = 'xmpp_format_%s'%realm
    253253            settings[realm] = SubscriptionSetting(self.env, name,
    254                 self.xmpp_format_setting.default)
     254                XmppDistributor(self.env).xmpp_format_setting.default)
    255255        if req.method == "POST":
    256256            for realm, setting in settings.items():
    257257                name = 'xmpp_format_%s'%realm

Attachments (0)

Change History (7)

comment:1 follow-up: Changed 5 years ago by hasienda

  • Cc doki_pen added; hasienda removed
  • Keywords i18n added
  • Owner changed from doki_pen to hasienda

Would you be so kind as to assign any i18n stuff directly to me, please?

I'll have to resolve it anyway, since I did the initial implementation, and I'm on the way to improve it within next few weeks due to suspected Trac 0.11 backwards-compatibility issues, that I found in similar code for AccountManagerPlugin before. Thank you for taking care.

comment:2 Changed 4 years ago by hasienda

(In [12192]) TracAnnouncer: Correct class association for xmpp_format_setting, refs #9206.

Thanks to Jun Omae for testing, report with clear explanation and the patch itself. Sorry for taking so much time until applying your fix.

comment:3 in reply to: ↑ 1 Changed 4 years ago by jun66j5

Replying to hasienda:

Would you be so kind as to assign any i18n stuff directly to me, please?

Ok. I do so from next time.

comment:4 Changed 4 years ago by hasienda

  • Cc rjollos added

#7828 has been closed as a duplicate.

comment:5 Changed 8 weeks ago by rjollos

  • Owner hasienda deleted

comment:6 Changed 7 weeks ago by rjollos

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

comment:7 Changed 7 weeks ago by rjollos

  • Owner set to jun66j5

Add Comment

Modify Ticket

as closed The owner will remain jun66j5.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.