Opened 16 years ago
Closed 5 years ago
#4172 closed defect (fixed)
MediaWikiPlugin raises AttributeError: 'NoneType' object has no attribute 'groups'
Reported by: | anonymous | Owned by: | permon |
---|---|---|---|
Priority: | normal | Component: | MediaWikiPluginMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
While displaying a wiki page, which begins with calling the MediaWiki renderer and ends with closing it, trac raises a AttributeError: 'NoneType' object has no attribute 'groups'
I'll try to attach the broken wikipage which can be loaded with trac-admin . wiki load /tmp/directory where that file relies in /tmp/directory.
Attachments (2)
Change History (9)
Changed 16 years ago by
comment:1 Changed 16 years ago by
Trac Release: | 0.11 → 0.10 |
---|
Hi,
I've the same problem.
Somebody have a solution at this error ?
Thanks
Florent
Traceback (most recent call last): File "/var/lib/python-support/python2.5/trac/web/main.py", line 387, in dispatch_request dispatcher.dispatch(req) File "/var/lib/python-support/python2.5/trac/web/main.py", line 237, in dispatch resp = chosen_handler.process_request(req) File "/var/lib/python-support/python2.5/trac/wiki/web_ui.py", line 135, in process_request self._render_view(req, db, page) File "/var/lib/python-support/python2.5/trac/wiki/web_ui.py", line 444, in _render_view 'page_html': wiki_to_html(page.text, self.env, req), File "/var/lib/python-support/python2.5/trac/wiki/formatter.py", line 999, in wiki_to_html Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines) File "/var/lib/python-support/python2.5/trac/wiki/formatter.py", line 793, in format self.handle_code_block(line) File "/var/lib/python-support/python2.5/trac/wiki/formatter.py", line 733, in handle_code_block self.req, self.code_text))) File "/var/lib/python-support/python2.5/trac/wiki/formatter.py", line 112, in process text = self.processor(req, text) File "/var/lib/python-support/python2.5/trac/wiki/formatter.py", line 100, in _macro_processor return self.macro_provider.render_macro(req, self.name, text) File "build/bdist.linux-i686/egg/mediawiki/mediawiki.py", line 32, in render_macro return self.expand_macro(None, name, content) File "build/bdist.linux-i686/egg/mediawiki/mediawiki.py", line 28, in expand_macro return parse(content) File "build/bdist.linux-i686/egg/mediawiki/parser.py", line 2450, in parse text = removeHtmlTags(text) File "build/bdist.linux-i686/egg/mediawiki/parser.py", line 274, in removeHtmlTags slash, t, params, brace, rest = m.groups() AttributeError: 'NoneType' object has no attribute 'groups'
Changed 13 years ago by
Attachment: | allow_lessthan.patch added |
---|
patch to prevent runtime error if the mediawiki macro encountered a less-than ("<") sign
comment:2 follow-up: 3 Changed 13 years ago by
allow_lessthan.patch fixed the problem for me. The problem occurred whenever the mediawiki processor would encounter a "<" in your text.
comment:3 Changed 13 years ago by
Replying to anonymous:
allow_lessthan.patch fixed the problem for me. The problem occurred whenever the mediawiki processor would encounter a "<" in your text.
Oh and BTW, I am running Trac 0.12.2. (I see this ticket is against 0.10.)
comment:4 Changed 5 years ago by
Running Trac 1.2.3; confirmed that applying the above patch prior to plugin install corrects the identified issue, which was blocking essentially every MediaWiki import for us.
comment:7 Changed 5 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
wiki page exported from MediaWiki which breaks Trac+MediawikiPlugin