#7666 closed defect (fixed)
KeyError: 'announcer/locale' on email notification
Reported by: | Crunk | Owned by: | Steffen Hoffmann |
---|---|---|---|
Priority: | normal | Component: | AnnouncerPlugin |
Severity: | critical | Keywords: | i18n backwards-incompatible |
Cc: | Robert Corsaro | Trac Release: | 0.12 |
Description
I am using Trac 0.12 and moved from Announcer-Plugin 1.0-a1 to 0.12-p2.dev (trunk).
Now, each time a ticket is changed Trac experiences an error. I attached the error information page.
AnnouncerPlugin is configured as follows:
[components] announcer.api.announcementsystem = enabled announcer.distributors.mail.emaildistributor = enabled announcer.formatters.ticket.ticketformatter = enabled announcer.formatters.wiki.wikiformatter = enabled announcer.pref.announcerpreferences = enabled announcer.producers.attachment.attachmentchangeproducer = enabled announcer.producers.ticket.ticketchangeproducer = enabled announcer.producers.wiki.wikichangeproducer = enabled announcer.resolvers.sessionemail.sessionemailresolver = enabled announcer.subscribers.ticket_compat.carboncopysubscriber = enabled announcer.subscribers.ticket_compat.legacyticketsubscriber = enabled announcer.subscribers.ticket_components.ticketcomponentsubscriber = enabled announcer.subscribers.ticket_custom.ticketcustomfieldsubscriber = enabled announcer.subscribers.watch_users.userchangesubscriber = enabled announcer.subscribers.watchers.watchsubscriber = enabled
[announcer] admit_domains = always_notify_component_owner = false always_notify_owner = false always_notify_reporter = false always_notify_updater = false default_email_format = text/html email_address_resolvers = SpecifiedEmailResolver, SessionEmailResolver ignore_domains = mime_encoding = base64 smtp_always_bcc = smtp_always_cc = smtp_default_domain = smtp_enabled = true smtp_from = trac-no-reply@*****.com smtp_from_name = Trac smtp_password = smtp_port = 25 smtp_replyto = no-reply@*****.com smtp_server = smtp.*****.com smtp_subject_prefix = __default__ smtp_timeout = 30 smtp_user = ticket_email_header_fields = owner, reporter, milestone, component, priority, severity. ticket_email_subject = Ticket #${ticket.id}: ${ticket['summary']}. ticket_subject_template = $prefix $ticket.id: $summary use_public_cc = false use_short_addr = false use_tls = false
If you need further information... let me know
Attachments (1)
Change History (8)
Changed 14 years ago by
Attachment: | Oops...txt added |
---|
comment:1 Changed 14 years ago by
Owner: | changed from Robert Corsaro to Steffen Hoffmann |
---|---|
Priority: | normal → highest |
Severity: | major → critical |
comment:2 Changed 14 years ago by
Cc: | Robert Corsaro added; anonymous removed |
---|---|
Keywords: | i18n backwards-incompatible added |
Priority: | highest → normal |
Summary: | Internal error on Email Notification → KeyError: 'announcer/locale' on email notification |
comment:3 Changed 14 years ago by
Hello again.
Now, I am not getting crashes any more.
After killig and repairing my complete Trac installation after installing Babel (I did not have installed Babel on Trac installation) (see Trac Bug #9439 http://trac.edgewall.org/ticket/9439 and solution http://trac.edgewall.org/ticket/9439#comment:16 AnnouncerPlugin still did not work as intended.
After one more hour of investigation I found out that the option email_enabled = true
also has to be set, and it worked. As mentioned in other Bugs this parameter should be better documented.
AnnouncerPlugin sends mail on correct events... but not using the configured smtp server as it seems... I will keep investigating....
comment:4 Changed 14 years ago by
Status: | new → assigned |
---|
I've just finished a major rewrite of AnnouncerPlugin's wiki page and hope, that you'll find it easier now to get relevant information for a quick start. Any comments are still appreciated.
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I've turned email_enabled to true by default. I've also changed the way install works so that locales are automatically compiled. You'll still need to make sure Babel is installed before installing TracAnnouncer
comment:7 Changed 13 years ago by
(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.
Oh well. You're aware, that we added i18n stuff lately, right? So you need to take care about the fancy additional command
before packaging. The error you present suggests that something went wrong and directory announcer/locale (holding translatable strings catalogs in different languages) never got created (inside the Python egg). You have Babel >= 0.9.5 installed, don't you?
Most probably it is related to this, so need to push it up to highest prio. :-) Still we might, and possibly we will resort to a more backwards-compatible implementation soon. Until then you'll be out of luck, if you don't take care for this additional dependency, even for native-English applications. Sorry for that, there is a learning curve with developers too. And thanks for taking care and reporting back. Would like to see you continuing your feedback.