googleapis/python-documentai

samples.snippets.batch_parse_form_v1beta2_test: test_batch_parse_form failed

flaky-bot opened this issue · 0 comments

Note: #138 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: 35e3b74
buildURL: Build Status, Sponge
status: failed

Test output
capsys = <_pytest.capture.CaptureFixture object at 0x7f7c25e3ad30>
def test_batch_parse_form(capsys):
  batch_parse_form_v1beta2.batch_parse_form(
        PROJECT_ID, INPUT_URI, BATCH_OUTPUT_URI, 120
    )

batch_parse_form_v1beta2_test.py:44:


batch_parse_form_v1beta2.py:93: in batch_parse_form
bucket = storage_client.get_bucket(output_bucket)
.nox/py-3-8/lib/python3.8/site-packages/google/cloud/storage/client.py:402: in get_bucket
bucket.reload(
.nox/py-3-8/lib/python3.8/site-packages/google/cloud/storage/bucket.py:1001: in reload
super(Bucket, self).reload(
.nox/py-3-8/lib/python3.8/site-packages/google/cloud/storage/_helpers.py:218: in reload
api_response = client._connection.api_request(
.nox/py-3-8/lib/python3.8/site-packages/google/cloud/storage/_http.py:78: in api_request
return call()
.nox/py-3-8/lib/python3.8/site-packages/google/api_core/retry.py:285: in retry_wrapped_func
return retry_target(
.nox/py-3-8/lib/python3.8/site-packages/google/api_core/retry.py:188: in retry_target
return target()
.nox/py-3-8/lib/python3.8/site-packages/google/cloud/_http.py:473: in api_request
response = self._make_request(
.nox/py-3-8/lib/python3.8/site-packages/google/cloud/_http.py:337: in _make_request
return self._do_request(
.nox/py-3-8/lib/python3.8/site-packages/google/cloud/_http.py:375: in _do_request
return self.http.request(
.nox/py-3-8/lib/python3.8/site-packages/google/auth/transport/requests.py:476: in request
self.credentials.before_request(auth_request, method, url, request_headers)
.nox/py-3-8/lib/python3.8/site-packages/google/auth/credentials.py:133: in before_request
self.refresh(request)
.nox/py-3-8/lib/python3.8/site-packages/google/oauth2/service_account.py:407: in refresh
access_token, expiry, _ = _client.jwt_grant(
.nox/py-3-8/lib/python3.8/site-packages/google/oauth2/_client.py:193: in jwt_grant
response_data = _token_endpoint_request(request, token_uri, body)
.nox/py-3-8/lib/python3.8/site-packages/google/oauth2/_client.py:165: in _token_endpoint_request
_handle_error_response(response_data)


response_data = {'error': 'invalid_grant', 'error_description': 'Invalid JWT Signature.'}

def _handle_error_response(response_data):
    """Translates an error response into an exception.

    Args:
        response_data (Mapping): The decoded response data.

    Raises:
        google.auth.exceptions.RefreshError: The errors contained in response_data.
    """
    try:
        error_details = "{}: {}".format(
            response_data["error"], response_data.get("error_description")
        )
    # If no details could be extracted, use the response data.
    except (KeyError, ValueError):
        error_details = json.dumps(response_data)
  raise exceptions.RefreshError(error_details, response_data)

E google.auth.exceptions.RefreshError: ('invalid_grant: Invalid JWT Signature.', {'error': 'invalid_grant', 'error_description': 'Invalid JWT Signature.'})

.nox/py-3-8/lib/python3.8/site-packages/google/oauth2/_client.py:60: RefreshError