yosi - 2006-08-17

I have resolved the issue. I'm posting this here in hopes it helps in the future.

The fix to the problem was to manualy remove the libgmail directory from /usr/lib/python/ and only then do the install. Maybe there's something that can go wrong with the uninstall process?

Thanks for the help and responses.

Original BUG content is below:
Bugs item #1537989, was opened at 2006-08-10 07:34
Message generated for change (Comment added) made by wdaher
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Can't login

Initial Comment:

I don't know if it's a bug or a miss usage.
I was using a previous version of libgmail w/o problem.
Recently I've installed version 0.1.5, since then I
can't login when using the same API as before
example (userName and passwd are valid, confirmed):
"ga = GmailAccount(userName, passwd)
File "<stdin>", line 1, in ?
line 82, in __init__
line 126, in connect
File "/usr/lib/python2.4/libgmail/libgmail.py", line
320, in login
   pageData = self._retrievePage(redirectURL)
File "/usr/lib/python2.4/libgmail/libgmail.py", line
333, in _retrievePage
   resp = urllib2.urlopen(req)
File "/usr/lib/python2.4/urllib2.py", line 130, in
   return _opener.open(url, data)
File "/usr/lib/python2.4/urllib2.py", line 356, in open
   req = meth(req)
File "/usr/lib/python2.4/urllib2.py", line 943, in
   raise URLError('no host given')
urllib2.URLError: <urlopen error no host given>

I have a very nice and usefull script that uses this
lib and now it's broken :(

Please help.



>Comment By: Waseem Daher (wdaher)
Date: 2006-08-16 01:48

Logged In: YES

I'll look into adding a bit more debugging stuff at some
point -- as you mentioned, though, this looks like a
your-installation issue, so I'll close this bug for now.


Comment By: yosi (izaqyos)
Date: 2006-08-11 05:48

Logged In: YES

Hi stas_zytkiewicz, thanks for your response.

I have tried in python shell to execute line by line to code
o f libgmail.login function and the code worked fine (after
I have defined and imported the appropriate symbols and
libs). So it really strikes me as an installation issue,
rather the a routing/proxy issue.

Also the fact that I can login using directly the libgmail
lib seems to indicate in that direction.

I wish there was some way to debug the code, or add more
prints because the problem seems to be located in the
_retreive_page function. It should receive a "req" parameter
rather than a url and the exception states that it gets a
"redirectUrl" parameter.


Comment By: yosi (izaqyos)
Date: 2006-08-11 05:23

Logged In: YES

Another check, as follows.

Reinstall on cygwin. script doesn't work with the
same error. I've tried to use the scripts that come with the
installation and I got the follwing results.

the libgmail.py works fine on cygwin! I can login successfully.

The archive.py script fails login with the following error:
WARNING:root:Note: Using currently installed `libgmail` version.
Gmail account name: izaqyos
Traceback (most recent call last):
File "./archive.py", line 39, in ?
   ga = libgmail.GmailAccount(name, pw)
AttributeError: 'module' object has no attribute 'GmailAccount'

I think this error indicates a problem with the
installation, but I'm not certain.

What I will do now is compare the two scripts and try to
deduce from this the problem.


Comment By: Stas Zytkiewicz (stas_zytkiewicz)
Date: 2006-08-11 05:20

Logged In: YES

Are you perhaps using some sort of proxy setup?
There are issues regarding routing libgmail through proxies.

Stas Zytkiewicz


Comment By: yosi (izaqyos)
Date: 2006-08-11 05:14

Logged In: YES

No intention to spam, just wanted to say the following.

This lib is so useful. thank you very much wdaher for
creating it and for maintaining it!

Also I checked on windows (w/o installing the lib) and the
login works. so it must be either something with the
installation for cygwin or with the actual setup on cygwin.


Comment By: yosi (izaqyos)
Date: 2006-08-11 05:05

Logged In: YES

Thank you wdaher,

I have tried your suggestion but it still fails with the
same error. IMO the problem has nothing to do with the
upgrade (though is started only after I've upgraded). Maybe
the problem has to do with the specific setup I'm using
(though I've used this setup for months w/o problems), my
setup is cygwin on a win-2k machine.

This btw gives me an idea, why not try to run the script
from windows. Do you perhaps now how to install libgmail for

Oh and I'm now logged in :)


Comment By: Nobody/Anonymous (nobody)
Date: 2006-08-11 04:50

Logged In: NO

I have done more tests as follows:

1. installed on different PCs that I have. they all work
fine accept the first one. The first one is a laptop that I
use for work and has many network related apps running
(including firewall, VPN and so forth) so maybe this has
something to do with the problem.

2. I have installed older versions of libgmail and they all
have the same problem, so the problem has nothing to do with
an upgrade.

3. A request, I'm a dev, but a newb to python - is there a
way I can debug libgmail to give more accurate report of the



Comment By: Waseem Daher (wdaher)
Date: 2006-08-11 02:22

Logged In: YES

Hey there! Do me a favor and give this another try with
libgmail, the very latest release? I'm able to log
in fine on several of my accounts with it.