Tag: encode decode ascii

Python: encode / decode problems

I was trying to insert values into  a table from a blog post. Problem code: filehandle.write(“, 1, ‘2009-06-03 17:11:58’, ‘2009-06-03 17:11:8’,’”) e = d.entries[val] content = e.content[0].value #print content filehandle.write(str(content)) Issue: Since we are trying to write a junk value in to a file, and this is not ascii supported we get the below error.

Continue Reading →