ctberthiaume/gdcp

error 502 / resumable progress problem

ohthetrees opened this issue · 2 comments

01/17/2015 02:20:11 PM    INFO       gdcp                      : Uploading /Old_3TB/Cedar/yang's cp_working/bol1/bol1/phd_dir/bol1f1_fp03q356.x1.phd.1, mimeType=application/octet-stream
01/17/2015 02:20:33 PM    WARNING    gdcp                      : HTTP error 502, retrying in 1s ...
Traceback (most recent call last):
  File "/usr/local/bin/gdcp", line 941, in <module>
    main()
  File "/usr/local/bin/gdcp", line 38, in main
    cli()
  File "/usr/local/bin/gdcp", line 832, in cli
    args.func(args)
  File "/usr/local/bin/gdcp", line 897, in cli_upload_file
    not args.no_checksum)
  File "/usr/local/bin/gdcp", line 514, in upload_folder
    drive, subdir, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 514, in upload_folder
    drive, subdir, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 514, in upload_folder
    drive, subdir, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 514, in upload_folder
    drive, subdir, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 514, in upload_folder
    drive, subdir, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 509, in upload_folder
    drive, onefile, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 374, in upload_file
    status, response = request.next_chunk()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oauth2client/util.py", line 135, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/googleapiclient/http.py", line 819, in next_chunk
    status, body = self._process_response(resp, content)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/googleapiclient/http.py", line 896, in _process_response
    self.resumable_progress = int(resp['range'].split('-')[1]) + 1
KeyError: 'range'

Here is another similar error, this time kicked off by a 503 error:

01/21/2015 12:05:51 AM    INFO       gdcp                      : Uploading /Old_3TB/Cedar/yang's cp_working/asdi1/asdi1f2/chromat_dir/asdi1f2_fp01q428.x1.gz, mimeType=application/octet-stream
01/21/2015 12:06:02 AM    WARNING    gdcp                      : HTTP error 503, retrying in 1s ...
01/21/2015 12:06:13 AM    WARNING    gdcp                      : HTTP error 503, retrying in 2s ...
Traceback (most recent call last):
  File "/usr/local/bin/gdcp", line 941, in <module>
    main()
  File "/usr/local/bin/gdcp", line 38, in main
    cli()
  File "/usr/local/bin/gdcp", line 832, in cli
    args.func(args)
  File "/usr/local/bin/gdcp", line 897, in cli_upload_file
    not args.no_checksum)
  File "/usr/local/bin/gdcp", line 514, in upload_folder
    drive, subdir, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 514, in upload_folder
    drive, subdir, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 514, in upload_folder
    drive, subdir, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 514, in upload_folder
    drive, subdir, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 514, in upload_folder
    drive, subdir, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 509, in upload_folder
    drive, onefile, parent_id=folder_id, checksum=checksum)
  File "/usr/local/bin/gdcp", line 374, in upload_file
    status, response = request.next_chunk()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/oauth2client/util.py", line 135, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/googleapiclient/http.py", line 819, in next_chunk
    status, body = self._process_response(resp, content)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/googleapiclient/http.py", line 896, in _process_response
    self.resumable_progress = int(resp['range'].split('-')[1]) + 1
KeyError: 'range'

Addressed by 67c1d48