Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jskeet opened this issue Dec 9, 2019 · 2 comments
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jskeet
Copy link
Contributor

jskeet commented Dec 9, 2019

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'
@jskeet jskeet changed the title Error around tuples and floats with docuploader Error "unsupported operand type(s) for -: 'tuple' and 'float'" when uploading Dec 9, 2019
@busunkim96 busunkim96 added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 9, 2019
@busunkim96
Copy link
Contributor

This looks like an error introduced by a new addition to the auth library. Working on rolling back that change with a new release.

Thank you for filing this!

@busunkim96
Copy link
Contributor

A new version of google-auth-library-python has been released.

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants