pombreda / gcalcli

Automatically exported from code.google.com/p/gcalcli
0 stars 0 forks source link

gcalcli fails with AttributeError on all operations. #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, all.  gcalcli worked perfectly for me for a few months until, within
the last couple of days, it ceased working entirely.  I didn't change
versions or configuration of gcalcli in any way.  I also made no changes to
any settings on my Google Calendar account.

What steps will reproduce the problem?
1. Run the command "gcalcli list" (or calm or calw or agenda.  Not tested
on any other commands).

What is the expected output? What do you see instead?
Expected output:
A list of all calendars available on the configured Google Calendars account.

Actual output (to stderr):
Traceback (most recent call last):
  File "./gcalcli", line 1114, in <module>
    DoooooItHippieMonster()
  File "./gcalcli", line 1025, in DoooooItHippieMonster
    borderColor=borderColor)
  File "./gcalcli", line 321, in __init__
    cal.gcalcli_username    = urllib.unquote(match.group(1))
AttributeError: 'NoneType' object has no attribute 'group'

What version of the product are you using? On what operating system?
I'm using the latest trunk version of gcalcli as of this writing on an
up-to-date Gentoo with Python 2.6.4.
isanum: be44dfc3-373b-0410-85d2-dd0c29f9a90b
revision: 65

I also observed this behavior on gcalcli 1.4.

Please provide any additional information below.
I did a bit of digging.  A few debugging print statements (near line 321)
indicated that self.feedPrefix was an http:// address while
cal.GetAlternateLink().href was giving an https:// address.

The obvious fix was to change feedPrefix on line 226.

-    feedPrefix    = 'http://www.google.com/calendar/feeds/'
+    feedPrefix    = 'https?://www.google.com/calendar/feeds/'

Making that change fixed gcalcli completely, as far as I've tested.  I'm
not sure if it's the proper or optimal fix, but it does do the job.

I think that's about it.  Do let me know if you need anything else from me.
 I'll give you whatever information I can.

Thanks, all.  gcalcli is a great program.  It's been a pleasure utilizing
it in place of the much more bloated software I was using previously.  :)

Original issue reported on code.google.com by randerso...@gmail.com on 13 May 2010 at 3:59

GoogleCodeExporter commented 9 years ago
I was experiencing the same problems and changing line 226 also resolved my 
issue.

Original comment by cdavis%t...@gtempaccount.com on 14 May 2010 at 11:40

GoogleCodeExporter commented 9 years ago
I have two google accounts - one a plain old google account and the other a 
google
apps account.

I was having the same problem as described above with my google apps account 
but not
with the google account. However, on changing line 226 as above the problem 
reversed
itself, I started getting the same error on the google account but the google 
apps
account problem was rectified.

Original comment by ish...@gmail.com on 2 Jun 2010 at 11:51

GoogleCodeExporter commented 9 years ago
Ah.  The calendar I'm accessing (and having trouble with) is Google Apps 
account, and
I've never tried gcalcli on a non-Google-Apps account.

It's odd that the fix I posted caused the problem to be present on the
non-Google-Apps account.  The modified regex should match the string
"http://www.google.com/calendar/feeds/" just as it did before.  The only 
difference
is that the modified regex should *also* match 
"https://www.google.com/calendar/feeds/".

Original comment by randerso...@gmail.com on 2 Jun 2010 at 2:51

GoogleCodeExporter commented 9 years ago
doh! Yes, you're right, I missed the ? symbol in the regex. Yes, including it 
fixes
it now for both accounts.

Original comment by ish...@gmail.com on 2 Jun 2010 at 3:39

GoogleCodeExporter commented 9 years ago
Sweet.  I guess all that's left is input (hopefully approval) from insanum, 
then.

Original comment by randerso...@gmail.com on 2 Jun 2010 at 3:52

GoogleCodeExporter commented 9 years ago
I was having the same problem using a regular Google account - this fixed it.  
Thanks!

Original comment by dwarin...@gmail.com on 23 Jun 2010 at 2:20

GoogleCodeExporter commented 9 years ago
I was having the same issue and changing line 226 did resolve it.  This 
probably has something to do with Google being more stringent about https.

Original comment by lgillent...@gmail.com on 15 Feb 2011 at 3:01

GoogleCodeExporter commented 9 years ago
I was having the same issue and changing line 226 did resolve it.  This 
probably has something to do with Google being more stringent about https.

Original comment by lgillent...@gmail.com on 15 Feb 2011 at 3:01

GoogleCodeExporter commented 9 years ago
This has been fixed.  A new "--https" option has been added.

Original comment by eda...@insanum.com on 24 Jul 2011 at 5:46

GoogleCodeExporter commented 9 years ago

Original comment by eda...@insanum.com on 27 Jul 2011 at 4:59