Menu ▾ ▴

#42 Invalid GmailAccount instance with SessionState

open
nobody
None
5
2007-08-27
2007-08-27
Anonymous
No

I've been trying to instantiate a GmailAccount object using a valid GmailSessionState object. It gets instantiated but when any of its function is called, the following error occurs:

AttributeError: GmailAccount instance has no attribute 'opener'

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Opener was not being created properly when GmailAccount object was instantiated with a GmailSession object.

    Here's the patch

    # diff libgmail-old.py libgmail.py
    317a318,322
    > self.opener = urllib2.build_opener(
    > urllib2.HTTPHandler(debuglevel=0),
    > urllib2.HTTPSHandler(debuglevel=0),
    > SmartRedirectHandler(self._cookieJar))
    >

     

Log in to post a comment.