python-messaging icon indicating copy to clipboard operation
python-messaging copied to clipboard

utf-8' codec can't decode byte 0xff in position 0

Open cszczepanski opened this issue 8 years ago • 1 comments

Hello, I try to use python-messaging. I try your example for the encoding of a MMS text + photo, but here is the error message:

pi@raspberrypi:~/PycharmProjects/mms $ python3 mms.py Traceback (most recent call last): File "mms.py", line 13, in payload = mms.encode() File "/usr/local/lib/python3.4/dist-packages/python_messaging-0.5.12-py3.4.egg/messaging/mms/message.py", line 223, in encode File "/usr/local/lib/python3.4/dist-packages/python_messaging-0.5.12-py3.4.egg/messaging/mms/mms_pdu.py", line 607, in encode File "/usr/local/lib/python3.4/dist-packages/python_messaging-0.5.12-py3.4.egg/messaging/mms/mms_pdu.py", line 802, in encode_message_body File "/usr/local/lib/python3.4/dist-packages/python_messaging-0.5.12-py3.4.egg/messaging/mms/message.py", line 552, in data File "/usr/lib/python3.4/codecs.py", line 313, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

You could explain me how to take out there. Thank you for your help best regards christophe

cszczepanski avatar May 31 '17 09:05 cszczepanski

I recently started migrating my codebase from python2 to python3 and encountered same.

cchristian avatar Jul 15 '19 19:07 cchristian