Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#12996 closed defect (fixed)

AttributeError: 'NoneType' object has no attribute 'groups'

Reported by: jabberz Owned by: Ryan J Ollos
Priority: normal Component: MarkdownMacro
Severity: normal Keywords:
Cc: Trac Release: 1.0


2016-12-13 14:17:33,789 Trac[formatter] ERROR: Processor Markdown failed:
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/wiki/", line 1188, in _exec_processor
    return processor.process(text)
  File "build/bdist.linux-x86_64/egg/trac/wiki/", line 362, in process
    text = self.processor(text)
  File "build/bdist.linux-x86_64/egg/trac/wiki/", line 349, in _macro_processor
  File "build/bdist.linux-x86_64/egg/Markdown/", line 74, in expand_macro
    return markdown(re.sub(LINK, convert, content), ['tables'])
  File "/usr/lib/python2.7/", line 155, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "build/bdist.linux-x86_64/egg/Markdown/", line 65, in convert
    url =, out_value).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'

I modify it to this, it worked fine:

<                 url =, out_value).groups()[0]
>                 try:
>                     url =, out_value).groups()[0]
>                 except:
>                     url = ""

Attachments (0)

Change History (3)

comment:1 Changed 18 months ago by Ryan J Ollos

It would be useful to see the markdown that led to the exception so that I could reproduce the issue locally.

comment:2 Changed 18 months ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 16092:

0.11.5: Handle case in which HREF regex does not find a match

Fixes #12996.

comment:3 Changed 18 months ago by Ryan J Ollos

Please test the latest and kindly report back whether it's working for you now. Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.