Modify ↓
#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 |
Description
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/formatter.py", line 1188, in _exec_processor return processor.process(text) File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 362, in process text = self.processor(text) File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 349, in _macro_processor text) File "build/bdist.linux-x86_64/egg/Markdown/macro.py", line 74, in expand_macro return markdown(re.sub(LINK, convert, content), ['tables']) File "/usr/lib/python2.7/re.py", line 155, in sub return _compile(pattern, flags).sub(repl, string, count) File "build/bdist.linux-x86_64/egg/Markdown/macro.py", line 65, in convert url = re.search(HREF, out_value).groups()[0] AttributeError: 'NoneType' object has no attribute 'groups'
I modify it to this, it worked fine:
65c65,68 < url = re.search(HREF, out_value).groups()[0] --- > try: > url = re.search(HREF, out_value).groups()[0] > except: > url = ""
Attachments (0)
Change History (3)
comment:1 Changed 8 years ago by
comment:3 Changed 8 years ago by
Please test the latest and kindly report back whether it's working for you now. Thanks!
Note: See
TracTickets for help on using
tickets.
It would be useful to see the markdown that led to the exception so that I could reproduce the issue locally.