When running simple (example) script I get UnicodeDecodeError: 'utf8' error: but that obvisouly depend on the source of message... Any idea on how to fix that?
Thanks a lot
Stephane

<b>SCRIPT:</b>"
<i>
  import libgmail
  ga = libgmail.GmailAccount("XX@gmail.com", "XXX")
  ga.login()
  folder = ga.getMessagesByFolder('inbox')

  for thread in folder:
    print thread.id, len(thread), thread.subject
    for msg in thread:
      print "  ", msg.id, msg.number, msg.subject
      print msg.source
</i>
I get the following error:
  UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1671-1673: invalid data
What depend on the last remain received ???? that has obvisoult something to do with email content???

<b>FULL TRACEBACK:</b>
<i>
Traceback (most recent call last):
  File "testx2.py", line 12, in ?
    print msg.source
  File "C:\Python24\Lib\site-packages\libgmail.py", line 1473, in _getSource
    self._source = self._account.getRawMessage(self.id)
  File "C:\Python24\Lib\site-packages\libgmail.py", line 498, in getRawMessage
    return self._retrievePage(
  File "C:\Python24\Lib\site-packages\libgmail.py", line 358, in _retrievePage
    return pageData.decode('utf-8')
  File "C:\Python24\lib\encodings\utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1671-1673: invalid data
</i>