#69 Searching by Labels not working?

closed
nobody
None
5
2011-01-10
2011-01-06
Anonymous
No

I have been running an script to process new Mails marked with a certain Label.

since almost 2 months, It has stopped working.

Traceback states that issue is regarding getMessageByLabel method:

Traceback (most recent call last):
File "GmailDown-v5.py", line 35, in <module>
result = ga.getMessagesByLabel('Mail_new', True)
File "c:\python26\lib\site-packages\libgmail.py", line 538, in getMessagesByLabel
cat=label, allPages = allPages)
File "c:\python26\lib\site-packages\libgmail.py", line 456, in _parseThreadSearch
items = self._parseSearchResult(searchType, start, **kwargs)
File "c:\python26\lib\site-packages\libgmail.py", line 441, in _parseSearchResult
return self._parsePage(_buildURL(**params))
File "c:\python26\lib\site-packages\libgmail.py", line 414, in _parsePage
items = _parsePage(self._retrievePage(urlOrRequest))
File "c:\python26\lib\site-packages\libgmail.py", line 99, in _parsePage
raise GmailError, 'Failed to parse data returned from gmail.'
libgmail.GmailError: Failed to parse data returned from gmail.

Discussion

  • Waseem Daher
    Waseem Daher
    2011-01-10

    • status: open --> closed
     
  • Waseem Daher
    Waseem Daher
    2011-01-10

    libgmail hasn't been maintained in quite some time, so it's not surprising to me that it's stopped working. I'd encourage you to instead check out Python's imap library to access Gmail via its IMAP interface -- this should be far less brittle to changes that Google makes to Gmail.