#68 login failed - TypeError: expected string or buffer

closed
nobody
None
5
2011-01-10
2011-01-02
No

I'm trying to find a way to bulk-download attachments from tagged mails. gmailfs.py wasn't working, so I tried to follow along this example:

http://pramode.net/articles/lfy/fuse/5.txt

The result is:

>>> ga.login()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "libgmail.py", line 317, in login
pageData = self._retrievePage(req)
File "libgmail.py", line 358, in _retrievePage
req = ClientCookie.Request(urlOrRequest)
File "/usr/lib64/python2.6/site-packages/mechanize/_request.py", line 31, in __init__
if not _rfc3986.is_clean_uri(url):
File "/usr/lib64/python2.6/site-packages/mechanize/_rfc3986.py", line 62, in is_clean_uri
return not bool(BAD_URI_CHARS_RE.search(uri))
TypeError: expected string or buffer

Discussion

  • Waseem Daher

    Waseem Daher - 2011-01-10

    Hi Shawn,

    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.

    - Waseem

     
  • Waseem Daher

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

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks