ashiklom / googlecl

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

Timed out error #417

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Use googlecl to upload a large file (100MB)

What is the expected output? What do you see instead?
I get this error (note I have a Google Apps Premier Account so the .mp3 isn't 
an issue):
Loading /mnt/hd1/music/2011/Essential 
Mix/BBC_Radio_1s_Essential_Mix_-_20110902230000.mp3
Traceback (most recent call last):
 File "/usr/bin/google", line 839, in <module>
   main()
 File "/usr/bin/google", line 825, in main
   run_once(options, args)
 File "/usr/bin/google", line 617, in run_once
   task.run(client, options, args)
 File "/usr/lib/pymodules/python2.7/googlecl/docs/__init__.py", line 161, in _run_upload
   convert=options.convert)
 File "/usr/lib/pymodules/python2.7/googlecl/docs/base.py", line 287, in upload_docs
   **kwargs)
 File "/usr/lib/pymodules/python2.7/googlecl/docs/base.py", line 352, in upload_single_doc
   file_ext)
 File "/usr/lib/pymodules/python2.7/googlecl/docs/client.py", line 295, in _transmit_doc
   return self.upload(path, entry_title, post_uri, content_type)
 File "/usr/lib/pymodules/python2.7/gdata/docs/client.py", line 418, in upload
   auth_token=auth_token, **kwargs)
 File "/usr/lib/pymodules/python2.7/gdata/client.py", line 685, in post
   desired_class=desired_class, **kwargs)
 File "/usr/lib/pymodules/python2.7/googlecl/client.py", line 60, in retry_request
   return self.retry_operation(*args, **kwargs)
 File "/usr/lib/pymodules/python2.7/googlecl/base.py", line 387, in retry_operation
   raise unexpected
socket.error: [Errno 110] Connection timed out

What version of the product are you using? On what operating system? What
version of gdata-python-client (aka python-gdata)?

Please provide any additional information below.

Original issue reported on code.google.com by r.plumri...@gmail.com on 3 Sep 2011 at 1:44

GoogleCodeExporter commented 9 years ago
I feel this might be more like a gdata-python-client issue since googlecl 
doesn't upload/download on its own.

There is a sample [1] for docs, I didn't try it but it has upload function and 
you can try it with ZIP format, formats see [2]. But you might want to try next 
first.

Since the error is from socket module, there is a quick trick

  import socket
  socket.setdefaulttimeout(86400) # one day should be enough

Try to insert this into the beginning of code of google.py, it should be a 
temporary workaround. If this trick does work for you, it's better that you 
open an issue on gdata-python-client, but I guess there might already be one. 
However, I did a quick grep on its code, there was nothing about default 
timeout, so it's not been dealt with yet.

[1] 
http://code.google.com/p/gdata-python-client/source/browse/samples/docs/docs_exa
mple.py
[2] 
http://code.google.com/p/gdata-python-client/source/browse/src/gdata/docs/servic
e.py#58

Original comment by livibet...@gmail.com on 3 Sep 2011 at 2:29

GoogleCodeExporter commented 9 years ago
Hmm, where might I find google.py. I can see the following on Ubuntu 11.04:

rupert@srvr:/usr/share/pyshared/gdata$ ls
acl        calendar_resource  exif         oauth           test_config.py
alt        client.py          finance      opensearch      test_data.py
analytics  codesearch         gauth.py     photos          tlslite
apps       contacts           geo          projecthosting  urlfetch.py
auth.py    core.py            health       sample_util.py  webmastertools
base       Crypto             __init__.py  service.py      youtube
blogger    data.py            maps         sites
books      docs               media        spreadsheet
calendar   dublincore         notebook     spreadsheets

Original comment by r.plumri...@gmail.com on 3 Sep 2011 at 3:22

GoogleCodeExporter commented 9 years ago
Sorry, my bad. It's in googlecl [1], that trick doesn't require you to modify 
gdata.

[1] http://code.google.com/p/googlecl/source/browse/#svn%2Ftrunk%2Fsrc

Original comment by livibet...@gmail.com on 3 Sep 2011 at 3:30

GoogleCodeExporter commented 9 years ago
Cool, I'll give it a whirl.

Original comment by r.plumri...@gmail.com on 3 Sep 2011 at 5:44

GoogleCodeExporter commented 9 years ago
Cool, I'll give it a whirl.

UPDATE

That fixed worked for a 4.5 MB file, will be trying it with a larger file this 
evening ;)

Original comment by r.plumri...@gmail.com on 3 Sep 2011 at 7:19