#2486 closed defect (fixed)
Error while sending ticket notification
| Reported by: | Owned by: | Jonas Borgström | |
|---|---|---|---|
| Priority: | high | Milestone: | 0.9.2 |
| Component: | ticket system | Version: | 0.9.1 |
| Severity: | normal | Keywords: | notification email |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
22:57:14 Trac[web_ui] ERROR: Failure sending notification on change to ticket #69: 'link'
Traceback (most recent call last):
File "/usr/local/lib/python2.3/site-packages/trac/ticket/web_ui.py", line 354, in _do_save
tn.notify(ticket, newticket=False, modtime=now)
File "/usr/local/lib/python2.3/site-packages/trac/Notify.py", line 212, in notify
NotifyEmail.notify(self, ticket.id, subject)
File "/usr/local/lib/python2.3/site-packages/trac/Notify.py", line 109, in notify
Notify.notify(self, resid)
File "/usr/local/lib/python2.3/site-packages/trac/Notify.py", line 47, in notify
self.send(to)
File "/usr/local/lib/python2.3/site-packages/trac/Notify.py", line 329, in send
hdrs['X-Trac-Ticket-URL'] = self.ticket['link']
File "/usr/local/lib/python2.3/site-packages/trac/ticket/model.py", line 94, in __getitem__
return self.values[name]
KeyError: 'link'
I have the following notification section in trac.ini:
[notification] smtp_replyto = donotreply@hellanzb.com smtp_always_cc = pjenvey@groovie.org smtp_server = localhost smtp_enabled = true smtp_from = donotreply@hellanzb.com always_notify_reporter = true always_notify_owner = true
Attachments (0)
Change History (4)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
I am facing the same issue with the 0.9.1 configure to be served by apache using trac.cgi.
I work around this issue by adding a try catch block the in model.py
def __getitem__(self, name):
try:
return self.values[name]
except KeyError:
self.env.log.warning('Added by yml - Invalid key for values dic %s choose among %s' %(name,str(self.values.keys())))
then the mail is sent but without the url to the ticket The mail send is the one below: #8: test 7
Reporter: anonymous | Owner: me@…
Type: defect | Status: new
Priority: major | Milestone:
Component: test | Version:
Resolution: | Keywords:
Comment (by anonymous):
test 2
— Ticket URL: ≠ ⇐===This is were the pb is TracRepository2 <http://example.com/> My example project
I hope that will help
comment:4 by , 20 years ago
| Milestone: | → 0.9.2 |
|---|---|
| Priority: | normal → high |
| Resolution: | → fixed |
| Status: | new → closed |
This issue has already bin fixed in 0.9.2.



This is on 1.0dev r2595