Closed GoogleCodeExporter closed 9 years ago
I have attached the code which we use to get the error described.
Original comment by j...@cloudspot.se
on 6 Dec 2010 at 2:26
Attachments:
Errormessage returned
############# Error - message in debug-mode: #########################
ERROR 2010-12-06 11:45:46,063 __init__.py:395] Server responded with: 503,
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 517, in __call__
handler.post(*groups)
File "C:\Users\Jens\Documents\04_My Projects\Forcebridgeserver\DocsHandler.py", line 124, in post
uploader.UploadFile('/feeds/upload/create-session/default/private/full',entry=gdata.docs.data.DocsEntry(title=atom.data.Title(text=file_name)))
File "C:\Users\Jens\Documents\04_My Projects\Forcebridgeserver\gdata\client.py", line 1028, in upload_file
start_byte, self.file_handle.read(self.chunk_size))
File "C:\Users\Jens\Documents\04_My Projects\Forcebridgeserver\gdata\client.py", line 988, in upload_chunk
raise error
RequestError: Server responded with: 503,
Original comment by j...@cloudspot.se
on 6 Dec 2010 at 2:30
********* INIT SESSION *******************
POST
/feeds/upload/create-session/default/private/full?convert=false&xoauth_requestor
_id=mail%40mail.se HTTP/1.1
Gdata-Version: 3.0
Content-Length: 128
Accept-Encoding: gzip
User-Agent: gdata-py/2.0.13 AppEngine-Google;
(+http://code.google.com/appengine)
X-Upload-Content-Length: 410459
Host: docs.google.com
X-Upload-Content-Type: application/pdf
Content-Type: application/atom+xml
Authorization: OAuth oauth_nonce="", oauth_timestamp="", oauth_consumer_key="",
oauth_signature_method="HMAC-SHA1", oauth_version="1.0", oauth_signature=""
<ns0:entry
xmlns:ns0="http://www.w3.org/2005/Atom"><ns0:title>filename.pdf</ns0:title></ns0
:entry>
******** INIT SESSION RESPONSE ***********
HTTP/1.1 200 OK
Server: Upload Server Built on Nov 29 2010 12:24:14 (1291062254)
Location:
http://docs.google.com/feeds/upload/create-session/default/private/full?convert=
false&xoauth_requestor_id=mail%40mail.se&upload_id=AEnB2Upr-yB-Mhh26XqdZAJZmVUDD
LUkxlMBmHw6UxZGBwrb_5s27ZUTCoesn5jXcX-7koH3ELotrOFLlcK8COLBMNIPRsWqXg
Date: Mon, 06 Dec 2010 10:01:26 GMT
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate
Content-Length: 0
Content-Type: text/html
********* FIRST CHUNK *******************
POST
/feeds/upload/create-session/default/private/full?convert=false&xoauth_requestor
_id=mail%40mail.se&upload_id=AEnB2Upr-yB-Mhh26XqdZAJZmVUDDLUkxlMBmHw6UxZGBwrb_5s
27ZUTCoesn5jXcX-7koH3ELotrOFLlcK8COLBMNIPRsWqXg HTTP/1.1
Gdata-Version: 3.0
Content-Length: 50000
Accept-Encoding: gzip
Content-Range: bytes 0-49999/410459
User-Agent: gdata-py/2.0.13 AppEngine-Google;
(+http://code.google.com/appengine)
Host: docs.google.com
Content-Type: application/pdf
Authorization: OAuth oauth_nonce="", oauth_timestamp="", oauth_consumer_key="",
oauth_signature_method="HMAC-SHA1", oauth_version="1.0", oauth_signature=""
%PDF-1.7%
<TRUNCATED BODY>
********* FIRST CHUNK RESPONSE *******************
HTTP/1.1 308 Resume Incomplete
Server: Upload Server Built on Nov 29 2010 12:24:14 (1291062254)
Date: Mon, 06 Dec 2010 10:01:27 GMT
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate
Content-Length: 0
Content-Type: text/html
********* SECOND CHUNK *******************
POST
/feeds/upload/create-session/default/private/full?convert=false&xoauth_requestor
_id=mail%40mail.se&upload_id=AEnB2Upr-yB-Mhh26XqdZAJZmVUDDLUkxlMBmHw6UxZGBwrb_5s
27ZUTCoesn5jXcX-7koH3ELotrOFLlcK8COLBMNIPRsWqXg HTTP/1.1
Gdata-Version: 3.0
Content-Length: 50000
Accept-Encoding: gzip
Content-Range: bytes 50000-99999/410459
User-Agent: gdata-py/2.0.13 AppEngine-Google;
(+http://code.google.com/appengine)
Host: docs.google.com
Content-Type: application/pdf
Authorization: OAuth oauth_nonce="", oauth_timestamp="", oauth_consumer_key="",
oauth_signature_method="HMAC-SHA1", oauth_version="1.0", oauth_signature=""
<TRUNCATED BODY>
********* SECOND CHUNK RESPONSE *******************
HTTP/1.1 503 Service Unavailable
Server: Upload Server Built on Nov 29 2010 12:24:14 (1291062254)
Date: Mon, 06 Dec 2010 10:01:28 GMT
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate
Content-Length: 0
Content-Type: text/html
Original comment by j...@cloudspot.se
on 6 Dec 2010 at 2:31
Questions:
Why does the second chunk fail?
I see some small issues which could relate problem I have:
1. To start with - all communication after the INIT-SESSION is HTTP POST, but
in the protocol-description
(http://code.google.com/apis/gdata/docs/resumable_upload.html) it says PUT.
2. All communication after the INIT-SESSION still uses the create session uri:
/feeds/upload/create-session/default/private/full - shouldn't it be using
something like http://docs.google.com/feeds/upload/upload-file/ instead? This
is a return-param from the INIT-SESSION so I can not do anything about this.
3. I had an idea that we get a LOCATION (new url to post the second chunk to,
in the response from the first chunk) which isn't handled by the GData
Resumable Upload - code, but it doesn't look like that when I look at the
http-traffic.
4. I also tried the sample code which is distributed with the Gdata API from
the command-line with two authentication methods, (1) client login and (3)
token from a webbrowser. Both if these fails but this time with a HTTP 400.
When I look at the HTTP-traffic from the sample I see that the content-range
header is totally messed up so the chunk-byte range is outside the
content-file-size. This means that the sample code doesn't work at all.
Original comment by j...@cloudspot.se
on 6 Dec 2010 at 2:32
http://code.google.com/apis/documents/forum.html?place=topic%2Fgoogle-documents-
list-api%2F2QLi1RADEu4%2Fdiscussion
Original comment by vicfry...@google.com
on 14 Dec 2010 at 8:13
Original issue reported on code.google.com by
j...@cloudspot.se
on 21 Nov 2010 at 9:27Attachments: