vcshing / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
Other
0 stars 0 forks source link

Calendar Batch Modifications cause Error 400 Bad Request #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create batch object
batch = BatchHttpRequest()
2.Retrieve primary calendar 
calendar = service.calendars().get(calendarId='primary').execute()
3.modify calendar 
calendar['summary'] = 'New Title for calendar'
4.add update request to batch
batch.add(service.calendars().update(calendarId=calendar['id'],
                                                 body=calendar))
5.Execute Batch
batch.execute()

What is the expected output? What do you see instead?
I expect that the execution should modify the primary calendar's name to the 
new assigned value. Instead a HttpError is thrown with Error Code 400, saying 
BadRequest.

What version of the product are you using? On what operating system?
Version 1.0beta7, Ubuntu 10.04

Please provide any additional information below.
A similar result happens on insertions like creating a new calendar. For 
requests that do not modify anything, like service.calendarList().list(), it 
works as expected.
I have only been working with the Calendar resources.

Original issue reported on code.google.com by cgam...@dorianstudio.com on 2 Jan 2012 at 8:35

GoogleCodeExporter commented 9 years ago
Do you get errors with the calls that make modifications when not made in batch 
calls? That is, if you don't use batch do all the calls you are making succeed?

Original comment by jcgregorio@google.com on 3 Jan 2012 at 2:30

GoogleCodeExporter commented 9 years ago
Yes, when making calls like service.calendars.update(calendarId=calendar['id'], 
body=calendar).execute(), it works as expected.

Original comment by cgam...@dorianstudio.com on 3 Jan 2012 at 5:19

GoogleCodeExporter commented 9 years ago
Currently being investigated, looks like an issue on the server side and the 
client side. Client side issues have been addressed in 
http://code.google.com/p/google-api-python-client/source/detail?r=ce0ec2c89f3d5f
a7935a639e51707c7bde9314e8 but batching is still broken for mutating requests.

Original comment by jcgregorio@google.com on 6 Jan 2012 at 3:07

GoogleCodeExporter commented 9 years ago
There was just a push to prod that fixed this issue.

There is still one outstanding issue with batch: 

  http://code.google.com/p/google-api-python-client/issues/detail?id=93

Original comment by jcgregorio@google.com on 3 Feb 2012 at 12:16