Upgrading to Latest libgmail 0.1.6

Help
2007-08-22
2013-05-21
  • GradeAWarrior

    GradeAWarrior - 2007-08-22

    I've downloaded the latest libgmail archive and trying to follow the given steps:

    =========

    import libgmail

    ga = libgmail.GmailAccount("google@gmail.com", "mymailismypass")
    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

    =========

    The error I'm running across is on the call to the constructor libgmail.GmailAccount("google@gmail.com", "mymailismypass"). I've used a previous version before this without problems, and the issue that I'm getting now with the new api is the following message:

    "this contructor takes no arguments"

    Any ideas what's going on?

     
    • GradeAWarrior

      GradeAWarrior - 2007-08-24

      Hmmm...further debugging this issue tells me that I only have this issue on Mac OS X. On WinXP, I have a different problem. I am fine working on a windows environment, in which I am using Python 2.4.4.

      The issue I'm struggling right now with is that I can successfully login using the above code, but I cannot successfully iterate through my 'inbox' folder. This is a pretty important issue to resolve. The basic problem is that I want to iterate through my inbox, and be able to read the email subject and body.

      Any help/suggestions would be greatly appreciated.

       
    • GradeAWarrior

      GradeAWarrior - 2007-08-27

      Looks like a fix was put out on 0.1.6.1 release. I've verified that there are no hickups on WinXP vmware image. I have yet to verify on Mac, but I'll get to that later on.

       
    • peterjez

      peterjez - 2007-09-24

      I'm having exactly the same problem on my Mac OSX, using version libgmail 0.1.6.2.

      Traceback (most recent call last):
        File "test.py", line 17, in ?
          ga = libgmail.GmailAccount(username, pw)
        File "/Users/peter/python/libgmail-0.1.6.2/libgmail.py", line 298, in __init__
          self.opener = urllib2.build_opener(
      TypeError: this constructor takes no arguments

       

Log in to post a comment.