Message72956
Example of UnicodeWriter.writerow(self,row) presented in Python 2.5
Manual at section 9.1.5 (Examples on CSV module of standard library)
does not correctly process rows containing not only strings, but also
int type values, raising an attribute error.
1st line of code in UnicodeWriter.writerow:
self.writer.writerow([s.encode("utf-8") for s in row])
tries to call .encode() method for s, that might be an int, not a
string. A simple workaround is:
self.writer.writerow([unicode(s).encode("utf-8") for s in row]) |
|
Date |
User |
Action |
Args |
2008-09-10 11:37:52 | mstatkus | set | recipients:
+ mstatkus, lemburg, loewis, skip.montanaro, jettlogic |
2008-09-10 11:37:52 | mstatkus | set | messageid: <1221046672.16.0.359573864052.issue1606092@psf.upfronthosting.co.za> |
2008-09-10 11:37:47 | mstatkus | link | issue1606092 messages |
2008-09-10 11:37:47 | mstatkus | create | |
|