Opened 17 years ago

Last modified 7 years ago

#954 closed defect

script does not work out of the box with .10.2 — at Version 2

Reported by: greg@… Owned by: anonymous
Priority: normal Component: EmailtoTracScript
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description (last modified by Noah Kantrowitz)

When I updated to 0.10.2 all of a sudden email2trac broke. Digging a bit I see:

Traceback (most recent call last):
  File "/usr/local/bin/email2trac", line 874, in ?
    tktparser.parse(sys.stdin)
  File "/usr/local/bin/email2trac", line 512, in parse
    self.new_ticket(m)
  File "/usr/local/bin/email2trac", line 407, in new_ticket
    tkt = Ticket(self.env)
  File "/usr/lib/python2.3/site-packages/trac/ticket/model.py", line 37, in __init__
    self.fields = TicketSystem(self.env).get_ticket_fields()
  File "/usr/lib/python2.3/site-packages/trac/ticket/api.py", line 145, in get_ticket_fields
    for field in self.get_custom_fields():
  File "/usr/lib/python2.3/site-packages/trac/ticket/api.py", line 164, in get_custom_fields
    field = {
  File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 1006, in wiki_to_oneliner
    OneLinerFormatter(env, absurls, db).format(wikitext, out, shorten)
  File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 859, in __init__
    Formatter.__init__(self, env, None, absurls, db)
  File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 236, in __init__
    self.href = absurls and (req or env).abs_href or (req or env).href
AttributeError: 'Environment' object has no attribute 'href'

Which I've seen before. The attached patch fixes it (at least it seems to).

Change History (4)

Changed 17 years ago by greg@…

Attachment: email2trac.patch added

Patch required to make it work with 0.10.2

Changed 17 years ago by greg@…

Attachment: email2trac.2.patch added

need the hack in new_ticket AND update_ticket - why?

comment:1 Changed 17 years ago by anonymous

Owner: changed from Bas van der Vlies to anonymous
Status: newassigned

Thanks for the patch. I also run 0.10.2 and do not have any problems with 0.10.2. Which options did you have set and did you set the trac_version to 0.10 instead of the default 0.9 in email2trac.conf?

comment:2 Changed 17 years ago by Noah Kantrowitz

Description: modified (diff)

Fix formatting.

Note: See TracTickets for help on using tickets.