From: Guenter M. <mi...@us...> - 2012-10-05 01:30:16
|
On 2012-10-02, Paul Tremblay wrote: > On Tue, Oct 2, 2012 at 5:23 AM, Guenter Milde <mi...@us...> wrote: >> On 2012-10-02, Paul Tremblay wrote: >> > I'm on sourceforge. This email comes from Darwin, but I ran the code on >> > Windows. I removed all the previous versions to make sure and then >> > downloaded the newest snapshot: >> > cd docutils >> > python setup.py install >> > cd test >> > rst2xml.py --traceback data/latin1.txt >> > Traceback (most recent call last): >> > File "c:/Python32/Scripts/rst2xml.py", line 23, in <module> >> > publish_cmdline(writer_name='xml', description=description) >> > File "c:\Python32\lib\site-packages\docutils\core.py", line 352, in >> > publish_cmdline >> > config_section=config_section, enable_exit_status=enable_exit_status) >> > File "c:\Python32\lib\site-packages\docutils\core.py", line 219, in >> > publish >> > output = self.writer.write(self.document, self.destination) >> > File "c:\Python32\lib\site-packages\docutils\writers\__init__.py", line >> > 81, in write >> > output = self.destination.write(self.output) >> > File "c:\Python32\lib\site-packages\docutils\io.py", line 393, in write >> > self.destination.write(data) >> > TypeError: 'str' does not support the buffer interface >> > Exception ValueError: 'I/O operation on closed file.' in >> <_io.TextIOWrapper >> > name='<stdout>' mode='w' encoding='cp437'> ignored >> > BUT: >> > rst2xml.py --output-encoding cp437 data/latin1.txt >> > gives no error. How about rst2xml.py --output-encding ascii data/latin1.txt rst2xml.py --output-encding utf8 data/latin1.txt Does the locale setting influence the result? >> > TypeError: 'str' does not support the buffer interface >> was caused by the "wrong" use of binary vs. unicode strings and also >> http://www.jeetworks.org/node/67 seems to suggest that this "cryptic" >> message points to such a problem. Does the same problem also happen with other frontends (rst2html, rst2latex, ...) I cannot do any testing, as I don't have access to a windows PC. Günter |