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

Timeout in AuthorizedSession causes TypeError: unsupported operand type(s) for -: 'tuple' and 'float' #404

Closed
busunkim96 opened this issue Dec 9, 2019 · 2 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@busunkim96
Copy link
Contributor

Reported in #403, but was also noticed in other logs for team tools. They were all using google-cloud-storage, although that may be a coincidence

#397 (release PR #399) was rolled back in #401 (release PR #402)

1119 /usr/local/lib/python3.7/site-packages/nlu/bucket_utils.py:23: in load_item
1120     pickled_cache_string = blob.download_as_string()
1121 /usr/local/lib/python3.7/site-packages/google/cloud/storage/blob.py:802: in download_as_string
1122     raw_download=raw_download,
1123 /usr/local/lib/python3.7/site-packages/google/cloud/storage/blob.py:719: in download_to_file
1124     transport, file_obj, download_url, headers, start, end, raw_download
1125 /usr/local/lib/python3.7/site-packages/google/cloud/storage/blob.py:643: in _do_download
1126     download.consume(transport)
1127 /usr/local/lib/python3.7/site-packages/google/resumable_media/requests/download.py:151: in consume
1128     result = _helpers.http_request(transport, method, url, **request_kwargs)
1129 /usr/local/lib/python3.7/site-packages/google/resumable_media/requests/_helpers.py:136: in http_request
1130     return _helpers.wait_and_retry(func, RequestsMixin._get_status_code, retry_strategy)
1131 /usr/local/lib/python3.7/site-packages/google/resumable_media/_helpers.py:150: in wait_and_retry
1132     response = func()
1133 /usr/local/lib/python3.7/site-packages/google/auth/transport/requests.py:252: in request
1134     self.credentials.before_request(auth_request, method, url, request_headers)
1135 /usr/local/lib/python3.7/site-packages/google/auth/transport/requests.py:89: in __exit__
1136     self.remaining_timeout = self._timeout - elapsed
1137 E   TypeError: unsupported operand type(s) for -: 'tuple' and 'float'
@jasonjanofsky
Copy link

Saw this as well, it looks like that self._timeout doesn't come out as a float but, instead is a tuple. Spent the last hour figuring this out. Thanks for clearing this out @busunkim96.

@plamut
Copy link
Contributor

plamut commented Dec 10, 2019

Closing, as the change that introduced the bug was reverted in #401.

(will re-submit the change with the logic handling tuples, too)

@plamut plamut closed this as completed Dec 10, 2019
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

4 participants