pombreda / gcalcli

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

gcalcli: fails to get actually calendar data ('body': 'Invalid UserId p', 'reason': 'Bad Request) #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=470586

I feel silly if that is smth obvious, but seems it should work but it
doesnt:

I specified my user and pw in ~/.gcalclirc:
[gcalcli]
user: .........
pw: ........

gcalcli list works correctly,
gcalcli quick adds into calendar fine, but if I try to search or get
agenda or calw or calm I get 

*$> gcalcli calm 1
Traceback (most recent call last):
  File "/usr/bin/gcalcli", line 1114, in ?
    DoooooItHippieMonster()
  File "/usr/bin/gcalcli", line 1077, in DoooooItHippieMonster
    gcal.CalQuery(args[0], startText=args[1])
  File "/usr/bin/gcalcli", line 817, in CalQuery
    eventList = self._SearchForCalEvents(start, end, start, None)
  File "/usr/bin/gcalcli", line 710, in _SearchForCalEvents
    feed = self.gcal.CalendarQuery(query)
  File "/var/lib/python-support/python2.4/gdata/calendar/service.py", line
115, in CalendarQuery
    result = self.Query(query.ToUri())
  File "/var/lib/python-support/python2.4/gdata/calendar/service.py", line
111, in Query
    result = self.Get(uri)
  File "/var/lib/python-support/python2.4/gdata/service.py", line 555, in Get
    raise RequestError, {'status': server_response.status,
gdata.service.RequestError: {'status': 400, 'body': 'Invalid UserId p',
'reason': 'Bad Request'}

The same if I provide --user --pw in cmdline. I think I type my
credentials correctly... actually if I specify incorrect passwd I actually get
Error: Failed to authenticate with Google Calendar!

I would be glad to provide any additional info to troubleshoot the problem.
Actually here is the sequence of those uri's printed around 111 with
anything credentials related being removed:

http://www.google.com/calendar/feeds/_PRIVATE_@gmail.com/private/full?start-max=
2008-04-01T00%3A00%3A00-04%3A00&singleevents=true&start-min=2008-03-01T00%3A00%3
A00-05%3A00
http://www.google.com/calendar/feeds/_PRIVATE_@group.calendar.google.com/private
/full?start-max=2008-04-01T00%3A00%3A00-04%3A00&singleevents=true&start-min=2008
-03-01T00%3A00%3A00-05%3A00
http://www.google.com/calendar/feeds/_PRIVATE_@group.calendar.google.com/private
/full?start-max=2008-04-01T00%3A00%3A00-04%3A00&singleevents=true&start-min=2008
-03-01T00%3A00%3A00-05%3A00
http://www.google.com/calendar/feeds/_PRIVATE_@group.calendar.google.com/private
/full?start-max=2008-04-01T00%3A00%3A00-04%3A00&singleevents=true&start-min=2008
-03-01T00%3A00%3A00-05%3A00
http://www.google.com/calendar/feeds/_PRIVATE_@group.calendar.google.com/private
/full?start-max=2008-04-01T00%3A00%3A00-04%3A00&singleevents=true&start-min=2008
-03-01T00%3A00%3A00-05%3A00
http://www.google.com/calendar/feeds/_PRIVATE_@group.calendar.google.com/private
/full?start-max=2008-04-01T00%3A00%3A00-04%3A00&singleevents=true&start-min=2008
-03-01T00%3A00%3A00-05%3A00
http://www.google.com/calendar/feeds/_PRIVATE_@group.calendar.google.com/private
/full?start-max=2008-04-01T00%3A00%3A00-04%3A00&singleevents=true&start-min=2008
-03-01T00%3A00%3A00-05%3A00
http://www.google.com/calendar/feeds/_PRIVATE_@holiday.calendar.google.com/priva
te/full?start-max=2008-04-01T00%3A00%3A00-04%3A00&singleevents=true&start-min=20
08-03-01T00%3A00%3A00-05%3A00
http://www.google.com/calendar/feeds/_PRIVATE_@holiday.calendar.google.com/priva
te/full?start-max=2008-04-01T00%3A00%3A00-04%3A00&singleevents=true&start-min=20
08-03-01T00%3A00%3A00-05%3A00
http://www.google.com/calendar/feeds/_PRIVATE_@group.v.calendar.google.com/priva
te/full?start-max=2008-04-01T00%3A00%3A00-04%3A00&singleevents=true&start-min=20
08-03-01T00%3A00%3A00-05%3A00

hope that helps

Cheers
Yarik

Original issue reported on code.google.com by brandon....@ifup.org on 13 Mar 2008 at 7:59

GoogleCodeExporter commented 9 years ago
I have a calendar, which Calendar ID: p#weather@group.v.calendar.google.com
so the url for this calendar is: 
http://www.google.com/calendar/feeds/p%23weather%
40group.v.calendar.google.com/public/basic
But gcalcli will try to get http://www.google.com/calendar/feeds/p#weather%
40group.v.calendar.google.com/public/basic

Notice the difference between "%23" and "#".
I don't know this is a bug of gdata or gcalcli.

Original comment by kuang...@gmail.com on 8 May 2008 at 5:42

GoogleCodeExporter commented 9 years ago
FYI, I file a bug for gdata and have a patch for it.
http://code.google.com/p/gdata-python-client/issues/detail?id=122

Original comment by kuang...@gmail.com on 10 May 2008 at 2:23

GoogleCodeExporter commented 9 years ago
Thanks kuangche - the gdata patch fixes this for me

Original comment by adam.ca...@gmail.com on 29 May 2008 at 11:20

GoogleCodeExporter commented 9 years ago
This issue has been fixed upstream in the gdata python library.

Original comment by eda...@insanum.com on 27 Jul 2011 at 8:13