I'll report with an example:
$ python gcp.py /cygdrive/d/dip.zip xxxxxxxx:test
Password:
Please wait, logging in...
Log in successful.
Traceback (most recent call last):
File "gcp.py", line 62, in ?
if ga.storeFile(filename, label=label):
File "/cygdrive/p/python/libgmail-0.1.4/libgmail.py",
line 730, in storeFile
draftMsg.addLabel(label)
File "/cygdrive/p/python/libgmail-0.1.4/libgmail.py",
line 1229, in addLabel
if not self._labels:
AttributeError: 'GmailMessageStub' object has no
attribute '_labels'
Looks like the following test on line 1229 is causing
the problem:
if not self._labels:
I tested the gcp.py program under cygwin and vanilla
python for windows (both version 2.4)
The previous version of libgmail (0.1.3.3) works fine
in this case.
Logged In: NO
You can fix this by performing the test like this:
if not hasattr(self, '_labels'):
Logged In: YES
user_id=1571626
In fact the problem come from the fact that the _labels
attribute is not created and not accessible !)