Edgewall Software

Ticket #2486 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Error while sending ticket notification

Reported by: pjenvey@… Owned by: jonas
Priority: high Milestone: 0.9.2
Component: ticket system Version: 0.9.1
Severity: normal Keywords: notification email
Cc:

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

Change History

Changed 3 years ago by pjenvey@…

This is on 1.0dev r2595

Changed 3 years ago by anonymous

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 TracRepository?2 <http://example.com/> My example project

I hope that will help

Changed 3 years ago by anonymous

  • version changed from devel to 0.9.1

Oups I forgot to specify the level

Changed 3 years ago by cmlenz

  • priority changed from normal to high
  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 0.9.2

This issue has already bin fixed in 0.9.2.

Add/Change #2486 (Error while sending ticket notification)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.