[Python-3000] Pleaswe help with the countdown to zero failing tests in the struni branch!

Christian Heimes lists at cheimes.de
Tue Aug 7 17:21:55 CEST 2007


Guido van Rossum wrote:
> Alas, not for me (Ubuntu 6.06 LTS, UCS2 build):
> 
> ======================================================================
> ERROR: testEncodings (__main__.MinidomTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "Lib/test/test_minidom.py", line 872, in testEncodings
>     self.assertEqual(doc.toxml(),
>   File "/usr/local/google/home/guido/python/py3k-struni/Lib/xml/dom/minidom.py",
> line 46, in toxml
>     return self.toprettyxml("", "", encoding)
>   File "/usr/local/google/home/guido/python/py3k-struni/Lib/xml/dom/minidom.py",
> line 54, in toprettyxml
>     self.writexml(writer, "", indent, newl, encoding)
>   File "/usr/local/google/home/guido/python/py3k-struni/Lib/xml/dom/minidom.py",
> line 1747, in writexml
>     node.writexml(writer, indent, addindent, newl)
>   File "/usr/local/google/home/guido/python/py3k-struni/Lib/xml/dom/minidom.py",
> line 817, in writexml
>     node.writexml(writer,indent+addindent,addindent,newl)
>   File "/usr/local/google/home/guido/python/py3k-struni/Lib/xml/dom/minidom.py",
> line 1036, in writexml
>     _write_data(writer, "%s%s%s"%(indent, self.data, newl))
>   File "/usr/local/google/home/guido/python/py3k-struni/Lib/xml/dom/minidom.py",
> line 301, in _write_data
>     writer.write(data)
>   File "/usr/local/google/home/guido/python/py3k-struni/Lib/io.py",
> line 1023, in write
>     b = s.encode(self._encoding)
> UnicodeEncodeError: 'latin-1' codec can't encode character '\u20ac' in
> position 0: ordinal not in range(256)

What's your locale? My locale setting is de_DE.UTF-8.
When I run the unit test of minidom with "LC_ALL=C ./python
Lib/test/test_minidom.py" testEncoding is failing, too.

> So true. I'm hoping the real author will identify himself. :-)

His name is Lars Gust<E4>bel (probably Gustöbel).

Christian



More information about the Python-3000 mailing list