Modify ↓
#13034 closed defect (duplicate)
function env.get_db_cnx() is no longer available with trac 1.2
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | AnnouncerPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
I've running trac 1.2 with the AnnouncerPlugin (trunk, rev 16171) and get the following errors:
The first one occurs when a message should be send via email:
2017-01-09 14:45:00,158 Trac[api] ERROR: AnnouncementSystem failed. Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/announcer/api.py", line 576, in _real_send evt) File "/usr/lib/python2.7/dist-packages/announcer/distributors/mail.py", line 278, in distribute address = resolver.get_address_for_name(name, authed) File "/usr/lib/python2.7/dist-packages/announcer/resolvers.py", line 58, in get_address_for_name db = self.env.get_db_cnx() AttributeError: 'Environment' object has no attribute 'get_db_cnx'
the second one occurs when a user visits his user preferences, Announcement tab.
File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 613, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 253, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.7/dist-packages/trac/prefs/web_ui.py", line 109, in process_request chosen_provider.render_preference_panel(req, panel_id) File "/usr/lib/python2.7/dist-packages/announcer/pref.py", line 87, in render_preference_panel for name, label, template, data in self._get_boxes(req): File "/usr/lib/python2.7/dist-packages/announcer/pref.py", line 82, in _get_boxes boxname)) File "/usr/lib/python2.7/dist-packages/announcer/resolvers.py", line 107, in render_announcement_preference_box specified = self.setting.get_user_setting(req.session.sid)[1] or '' File "/usr/lib/python2.7/dist-packages/announcer/util/settings.py", line 51, in get_user_setting db = self.env.get_db_cnx()
Attachments (0)
Note: See
TracTickets for help on using
tickets.
See #12120 and #12982.