Page MenuHomePhabricator

win32 py3 xmlreader test error
Closed, ResolvedPublic

Description

This only occurs on win32 py3 (not py2)

ERROR: test_XmlDumpRedirect (tests.xmlreader_tests.XmlReaderTestCase)

Traceback (most recent call last):

File "c:\pywiki\core\tests\xmlreader_tests.py", line 51, in test_XmlDumpRedirect
  "article-pyrus.xml")).parse()]
File "c:\pywiki\core\tests\xmlreader_tests.py", line 49, in <listcomp>
  pages = [r for r in
File "c:\pywiki\core\pywikibot\xmlreader.py", line 129, in parse
  for event, elem in context:
File "c:\Python34\lib\xml\etree\ElementTree.py", line 1302, in __next__
  data = self._file.read(16 * 1024)
File "c:\Python34\lib\encodings\cp1252.py", line 23, in decode
  return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 3344: character maps to <undefined>


Version: core-(2.0)
Severity: normal
OS: Windows XP

Details

Reference
bz70977

Related Objects

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:52 AM
bzimport added a project: Pywikibot-tests.
bzimport set Reference to bz70977.
bzimport added a subscriber: Unknown Object (????).
jayvdb created this task.Sep 17 2014, 11:42 PM

Change 161195 had a related patch set uploaded by XZise:
[FIX] Close opened files

https://gerrit.wikimedia.org/r/161195

Change 161195 merged by jenkins-bot:
[FIX] Close opened files and open XMLs in binary mode

https://gerrit.wikimedia.org/r/161195