https://bugzilla.wikimedia.org/show_bug.cgi?id=70978

            Bug ID: 70978
           Summary: win32 py3 sub error
           Product: Pywikibot
           Version: core (2.0)
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
       Web browser: ---
   Mobile Platform: ---

An error that only happens on py3

======================================================================
ERROR: test_item_templates (tests.wikibase_tests.TestPageMethods)
Test templatesWithParams.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\pywiki\core\tests\wikibase_tests.py", line 511, in test_item_templa
tes
    self.wdp.templatesWithParams()
  File "c:\pywiki\core\pywikibot\tools.py", line 317, in wrapper
    return method(*__args, **__kw)
  File "c:\pywiki\core\pywikibot\page.py", line 1267, in templatesWithParams
    templates = textlib.extract_templates_and_params(self.text)
  File "c:\pywiki\core\pywikibot\textlib.py", line 924, in extract_templates_a
nd_params
    return extract_templates_and_params_regex(text)
  File "c:\pywiki\core\pywikibot\textlib.py", line 951, in extract_templates_a
nd_params_regex
    thistxt = removeDisabledParts(text)
  File "c:\pywiki\core\pywikibot\textlib.py", line 294, in removeDisabledParts

    return toRemoveR.sub('', text)
TypeError: expected string or buffer

(And that error causes the following error)

======================================================================
ERROR: test_item_bot_may_edit (tests.wikibase_tests.TestPageMethods)
Test botMayEdit.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\pywiki\core\tests\wikibase_tests.py", line 521, in test_item_bot_ma
y_edit
    self.assertTrue(item.botMayEdit())
  File "c:\pywiki\core\pywikibot\page.py", line 897, in botMayEdit
    templates = self.templatesWithParams()
  File "c:\pywiki\core\pywikibot\tools.py", line 317, in wrapper
    return method(*__args, **__kw)
  File "c:\pywiki\core\pywikibot\page.py", line 1267, in templatesWithParams
    templates = textlib.extract_templates_and_params(self.text)
  File "c:\pywiki\core\pywikibot\textlib.py", line 924, in extract_templates_a
nd_params
    return extract_templates_and_params_regex(text)
  File "c:\pywiki\core\pywikibot\textlib.py", line 951, in extract_templates_a
nd_params_regex
    thistxt = removeDisabledParts(text)
  File "c:\pywiki\core\pywikibot\textlib.py", line 294, in removeDisabledParts

    return toRemoveR.sub('', text)
TypeError: expected string or buffer

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to