caiobegotti / Lost-Photos-Found

Linux version of the LostPhotos application for Mac/Windows
125 stars 9 forks source link

Exception: UnicodeDecodeError: 'utf8' codec can't decode byte 0xa5 in position 61: invalid start byte #11

Open eparra opened 10 years ago

eparra commented 10 years ago

I am experiencing:

36:50.029921 < EIKI357 OK Success LOG: [decoded header] '"=?UTF-8?B?SGlwUmVjYWxsTGVnYWxDZW50ZXI=?=" sjjqcqkdemwrofnunbxu.kgsrifihuehqymgrvkdh@Dzyx7kUD-KA6q8WL5.84c.TCCdE.6WybftW39.Mj4J45w.aeokeyst.com' Traceback (most recent call last): File "./lpf.py", line 22, in imap.lostphotosfound() File "/Users/eparra/Downloads/Lost-Photos-Found-master/lostphotosfound/server.py", line 234, in lostphotosfound header_subject = _charset_decoder(mail['Subject']) File "/Users/eparra/Downloads/Lost-Photos-Found-master/lostphotosfound/utils.py", line 42, in _charset_decoder header = header[0][0].decode(header[0][1]).encode('utf-8') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xa5 in position 61: invalid start byte

caiobegotti commented 10 years ago

Eddie, would you forward this particular e-mail to my Gmail so I can work on it? My e-mail is 'caio1982'. The log is cryptic but I suppose the decoded header can help you search it on Gmail?

eparra commented 10 years ago

Email sent. The email was unfiltered spam that was in my inbox.

eparra commented 10 years ago

I just sent you a second email with the same exception.

cmatsuoka commented 7 years ago

I had a similar problem caused by parts in a multi-part message having different encodings. Commit 6b07fe6 should provide a workaround for this problem.