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 |
Description
Hi, I got an arror with XMPP I added my XMPP name in the announcer's tab in the preferences menu. two errors:
- XMPP messages are not sent.
- 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
|
TracAnnouncer | 0.12.1.dev
|
TracCrystalXTheme | 1.0
|
TracCustomFieldAdmin | 0.2.5
|
TracGamedevTheme | 2.0
|
TracMacOSTheme | 1.0.2
|
TracMercurial | 0.12.0.23dev-r9953
|
TracStats | 0.3
|
TracThemeEngine | 2.0.1
|
TracTicketChainedFields | 0.1
|
TracTocMacro | 11.0.0.3
|
TracWatchlistPlugin | 0.7a1-dev
|
TracWikiPrintPlugin | 1.8.4
|
TracWysiwyg | 0.12.0.2-r8691
|
Python Traceback
Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/Trac-0.12-py2.6.egg/trac/web/main.py", line 513, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.6/site-packages/Trac-0.12-py2.6.egg/trac/web/main.py", 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/web_ui.py", line 77, in process_request template, data = chosen_provider.render_preference_panel(req, panel_id) File "/usr/lib/python2.6/site-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/pref.py", line 92, in render_preference_panel for name, label, template, data in self._get_boxes(req): File "/usr/lib/python2.6/site-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/pref.py", line 87, in _get_boxes pr.render_announcement_preference_box(req, boxname)) File "/usr/lib/python2.6/site-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/distributors/xmppd.py", line 254, in render_announcement_preference_box self.xmpp_format_setting.default) AttributeError: 'XmppPreferencePanel' object has no attribute 'xmpp_format_setting'
Attachments (0)
Change History (3)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
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/xmppd.py
251 251 for realm in supported_realms: 252 252 name = 'xmpp_format_%s'%realm 253 253 settings[realm] = SubscriptionSetting(self.env, name, 254 self.xmpp_format_setting.default)254 'text/plain') 255 255 if req.method == "POST": 256 256 for realm, setting in settings.items(): 257 257 name = 'xmpp_format_%s'%realm
comment:3 Changed 12 years ago by
Keywords: | user-preferences added |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Added this comment to get email notification (forgot to do so in original post)