Opened 14 years ago

Closed 12 years ago

#7828 closed defect (duplicate)

AttributeError: 'XmppPreferencePanel' object has no attribute 'xmpp_format_setting'

Reported by: anonymous Owned by: Robert Corsaro
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords: user-preferences
Cc: Trac Release: 0.12


Hi, I got an arror with XMPP I added my XMPP name in the announcer's tab in the preferences menu. two errors:

  1. XMPP messages are not sent.
  2. When I open the announcer tab (in preferences) I !get an error page.

Details bellow.

How to Reproduce

While doing a GET operation on /prefs/announcer, Trac issued an internal error.

Request parameters:

{'panel_id': u'announcer'}

User agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7

System Information

Trac 0.12
Trac 0.12
Babel 0.9.5
CustomFieldAdmin 0.2.5
Docutils 0.7
Genshi 0.6
Mercurial 1.6.3
mod_wsgi 3.1 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
Pygments 1.3.1
pysqlite 2.4.1
Python 2.6.4 (r264:75706, Jun 4 2010, 18:20:31)
[GCC 4.4.4 20100503 (Red Hat 4.4.4-2)]
Python 2.6.4 (r264:75706, Jun 4 2010, 18:20:31)
[GCC 4.4.4 20100503 (Red Hat 4.4.4-2)]
pytz 2010l
pytz 2010l
setuptools 0.6
setuptools 0.6
SQLite 3.6.22
Subversion 1.6.9 (r901367)
jQuery 1.4.2

Enabled Plugins

AcidTheme 0.1
BatchModify 0.7.0-trac0.12
FiveStarVote 0.1
ForceComment 0.1
forcepreview N/A
IniAdmin 0.2
LittleMary 1.0
OdtExportPlugin 0.6
TracAccountManager 0.2.1dev-r7737
TracCrystalXTheme 1.0
TracCustomFieldAdmin 0.2.5
TracGamedevTheme 2.0
TracMacOSTheme 1.0.2
TracStats 0.3
TracThemeEngine 2.0.1
TracTicketChainedFields 0.1
TracWatchlistPlugin 0.7a1-dev
TracWikiPrintPlugin 1.8.4

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/Trac-0.12-py2.6.egg/trac/web/", line 513, in _dispatch_request
  File "/usr/lib/python2.6/site-packages/Trac-0.12-py2.6.egg/trac/web/", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.6/site-packages/Trac-0.12-py2.6.egg/trac/prefs/", line 77, in process_request
    template, data = chosen_provider.render_preference_panel(req, panel_id)
  File "/usr/lib/python2.6/site-packages/", line 92, in render_preference_panel
    for name, label, template, data in self._get_boxes(req):
  File "/usr/lib/python2.6/site-packages/", line 87, in _get_boxes
    pr.render_announcement_preference_box(req, boxname))
  File "/usr/lib/python2.6/site-packages/", line 254, in render_announcement_preference_box
AttributeError: 'XmppPreferencePanel' object has no attribute 'xmpp_format_setting'

Attachments (0)

Change History (3)

comment:1 Changed 14 years ago by mehdi@…

Added this comment to get email notification (forgot to do so in original post)

comment:2 Changed 13 years ago by Jason Winnebeck

I don't know the proper solution to this, but xmpp_format_setting is an attribute of the distributor and not the preference panel. I'm a python noob, so I just replaced the undefined variable with the default value from the distributor as a workaround for my install, and XMPP sending works, although I'm still trying to assess whether it is useful because the notifications are basically the same as e-mails, so you just end up getting a huge message.

  • announcer/distributors/

    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                'text/plain')
    255255        if req.method == "POST":
    256256            for realm, setting in settings.items():
    257257                name = 'xmpp_format_%s'%realm

comment:3 Changed 12 years ago by Steffen Hoffmann

Keywords: user-preferences added
Resolution: duplicate
Status: newclosed

While #9206 essentially is a duplicate of this ticket, it came with a more appropriate patch proposal, that even has been applied in [12192].

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Robert Corsaro.
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.