Guest User

Untitled

a guest
Aug 26th, 2018
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. problems when using google docs api python version to upload file of arbitrary type [closed]
  2. bash-4.1$ python resumable_upload_sample.py
  3. Enter path to a file: /home/myfolder/test.txt
  4. Please choose the authorization mechanism you want to use.
  5. 1. to use your email address and password (ClientLogin)
  6. 2. to use a web browser to visit an auth web page (AuthSub)
  7. 3. if you have registed to use OAuth
  8. : 1
  9. Please enter your username: mylogin@gmail.com
  10. Password:
  11. Enter title for the document: test.txt
  12. Uploading /home/myfolder/test.txt ( text/plain ) @ 10 bytes...
  13. Traceback (most recent call last):
  14. File "resumable_upload_sample.py", line 221, in <module>
  15. main()
  16. File "resumable_upload_sample.py", line 213, in main
  17. gdata.docs.data.DocsEntry(title=atom.data.Title(text=title)))
  18. File "resumable_upload_sample.py", line 127, in UploadInManualChunks
  19. self.uploader._InitSession(uri, entry=new_entry)
  20. File "/usr/lib/python2.7/site-packages/gdata/client.py", line 944, in _init_session
  21. http_request=http_request)
  22. File "/usr/lib/python2.7/site-packages/gdata/client.py", line 265, in request
  23. uri=uri, auth_token=auth_token, http_request=http_request, **kwargs)
  24. File "/usr/lib/python2.7/site-packages/atom/client.py", line 117, in request
  25. return self.http_client.request(http_request)
  26. File "/usr/lib/python2.7/site-packages/atom/http_core.py", line 420, in request
  27. http_request.headers, http_request._body_parts)
  28. File "/usr/lib/python2.7/site-packages/atom/http_core.py", line 488, in _http_request
  29. connection.putheader(header_name, value)
  30. File "/usr/lib64/python2.7/httplib.py", line 924, in putheader
  31. str = '%s: %s' % (header, 'rnt'.join(values))
  32. TypeError: sequence item 0: expected string, int found
  33.  
  34. 'xfa'.join([1,2,3])
  35.  
  36. TypeError: sequence item 0: expected string, int found
Add Comment
Please, Sign In to add comment