KoalaTea / google-api-python-client

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

Batch mode ValueError too many values to unpack #102

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. After the sample oauth flow, trying to batch calendar insert.

service = build(serviceName='calendar', version='v3', http=http, 
developerKey='XX')
batch = BatchHttpRequest(callback=insert_callback)
# four add()s are performed
batch.add(service.events().insert(
            calendarId=calendar_id, body=event, fields='summary'))
batch.execute(http)

and then the Traceback occurs.

What version of the product are you using? On what operating system?
The google-api-python-client1.0beta7 (with apiclient/http.py latest version Feb 
7)
OS: x64 Win7

Please provide any additional information below.
Traceback (most recent call last):
  File "C:\Users\project\batch_insert.py", line 99, in <module>
    batch.execute(http)
  File "C:\Python27\lib\site-packages\google_api_python_client-1.0beta7-py2.7.egg\apiclient\http.py", line 665, in execute
    headers, content = self._deserialize_response(part.get_payload())
  File "C:\Python27\lib\site-packages\google_api_python_client-1.0beta7-py2.7.egg\apiclient\http.py", line 528, in _deserialize_response
    protocol, status, reason = status_line.split(' ')
ValueError: too many values to unpack

Original issue reported on code.google.com by ads901...@gmail.com on 9 Feb 2012 at 9:23

GoogleCodeExporter commented 8 years ago
There's been many updates to batch since beta7, please try pulling from head of 
mercurial and see if the problem still exists.

Original comment by jcgregorio@google.com on 9 Feb 2012 at 12:52

GoogleCodeExporter commented 8 years ago
I've updated the source files, however it still not working (with other 
exception occurs).
Attached is the httplib2 debug message. Thanks!

Traceback (most recent call last):
  File "C:\Users\project\helloworld2.py", line 84, in <module>
    batch.execute(http)
  File "C:\Python27\lib\site-packages\google_api_python_client-1.0beta7-py2.7.egg\apiclient\http.py", line 748, in execute
    fileobj=StringIO.StringIO(gzipped_content)).read()
  File "C:\Python27\lib\gzip.py", line 245, in read
    self._read(readsize)
  File "C:\Python27\lib\gzip.py", line 287, in _read
    self._read_gzip_header()
  File "C:\Python27\lib\gzip.py", line 181, in _read_gzip_header
    raise IOError, 'Not a gzipped file'
IOError: Not a gzipped file

Original comment by ads901...@gmail.com on 9 Feb 2012 at 3:26

Attachments:

GoogleCodeExporter commented 8 years ago
OK, more fixes to batch mode have been committed, please pull from head and try 
again.

Original comment by jcgregorio@google.com on 23 Feb 2012 at 6:03

GoogleCodeExporter commented 8 years ago
Closing. Please re-open if this issue still exists for you.

Original comment by jcgregorio@google.com on 2 Apr 2012 at 2:18