Skip to content

Error "unsupported operand type(s) for -: 'tuple' and 'float'" when uploading #22

@jskeet

Description

@jskeet

This is in a release build which has worked many times today - then failed for the last 6 builds. My guess is that an initial request failed, causing it to trigger some retry code which is broken. All builds are failing with this error:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Program Files (x86)\Python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\docuploader\__main__.py", line 176, in <module>
    main()
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\docuploader\__main__.py", line 125, in upload
    credentials_file=credentials,
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\docuploader\upload.py", line 34, in upload
    blob.upload_from_filename(filename=source)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\google\cloud\storage\blob.py", line 1318, in upload_from_filename
    predefined_acl=predefined_acl,
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\google\cloud\storage\blob.py", line 1263, in upload_from_file
    client, file_obj, content_type, size, num_retries, predefined_acl
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\google\cloud\storage\blob.py", line 1169, in _do_upload
    client, stream, content_type, size, num_retries, predefined_acl
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\google\cloud\storage\blob.py", line 963, in _do_multipart_upload
    response = upload.transmit(transport, data, object_metadata, content_type)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\google\resumable_media\requests\upload.py", line 106, in transmit
    retry_strategy=self._retry_strategy,
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\google\resumable_media\requests\_helpers.py", line 136, in http_request
    return _helpers.wait_and_retry(func, RequestsMixin._get_status_code, retry_strategy)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\google\resumable_media\_helpers.py", line 150, in wait_and_retry
    response = func()
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\google\auth\transport\requests.py", line 252, in request
    self.credentials.before_request(auth_request, method, url, request_headers)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\google\auth\transport\requests.py", line 89, in __exit__
    self.remaining_timeout = self._timeout - elapsed
TypeError: unsupported operand type(s) for -: 'tuple' and 'float'

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions