XZise added a subscriber: XZise.
XZise added a comment.

> wikibase_tests.TestPageMethods.test_item_templates
> 
> Traceback (most recent call last):
>   File "./tests/wikibase_tests.py", line 554, in test_item_templates
>     self.wdp.templatesWithParams()
>   File "./pywikibot/tools.py", line 647, in wrapper
>     return obj(*__args, **__kw)
>   File "./pywikibot/page.py", line 1288, in templatesWithParams
>     templates = textlib.extract_templates_and_params(self.text)
>   File "./pywikibot/textlib.py", line 973, in extract_templates_and_params
>     return extract_templates_and_params_regex(text)
>   File "./pywikibot/textlib.py", line 1000, in
> extract_templates_and_params_regex
>     thistxt = removeDisabledParts(text)
>   File "./pywikibot/textlib.py", line 327, in removeDisabledParts
>     return toRemoveR.sub('', text)
> TypeError: expected string or buffer
> 
> (this one is unrelated I believe.. but I thought we fixed this??)

Indeed this looks like T71664, but in this case the test is directly calling 
`templatesWithParams` on an `ItemPage` which itself calls 
`textlib.extract_templates_and_params` and T71664 just prevented that 
`botMayEdit` calls that `templatesWithParams`. But in theory this should happen 
anywhere and not just with Wikia.

A possible solution would be to override `templatesWithParams` in `ItemPage` to 
always return an empty list.

TASK DETAIL
  https://phabricator.wikimedia.org/T75513

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

To: XZise
Cc: pywikipedia-bugs, jayvdb, XZise



_______________________________________________
Pywikipedia-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-bugs

Reply via email to