UnicodeError for join()

tmallen thomasmallen at gmail.com
Thu Jan 15 21:25:11 CET 2009


This line of code is throwing a UnicodeError for a handful of the few
hundred files I'm processing:

rc_file.write("\n\n".join([self.title, "### BEGIN CONTENT ###",
self.content]))
.................
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
442: ordinal not in range()

What should I change to make this unicode-safe?

Thanks,
Thomas



More information about the Python-list mailing list