Hi, am using a res_partner inherit module and i have a field.char. But the probleme i have is, where i fill this field to create the object i get this error "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6: ordinal not in range(128)"
Help me please
In Python, unicode and str are two different data types. When Python tries to implicitly convert between one and the other, it uses encode (unicode -> str) and decode (str -> unicode). In OpenERP, text is actually Unicode. Encode and decode errors like your one can be avoided with some understanding of how Unicode works in Python. Ned Batchelder made an excellent presentation on the subject, google "unicode pain python".
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 4/17/13, 12:37 AM|
|Seen: 3451 times|
|Last updated: 3/16/15, 8:10 AM|