Error writing a file with file.write in Python. UnicodeEncodeError

http://stackoverflow.com/questions/22392377/error-writing-a-file-with-file-write-in-python-unicodeencodeerror