Skip to content

translate_v3beta1_translate_document_test: test_translate_document failed #8793

@flaky-bot

Description

@flaky-bot

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 2be381f
buildURL: Build Status, Sponge
status: failed

Test output
args = (parent: "projects/python-docs-samples-tests/locations/us-central1"
target_language_code: "fr-FR"
document_input_confi...8c8ab5a749762>\n ] >>\nstartxref\n88408\n%%EOF\n"
  mime_type: "application/pdf"
}
,)
kwargs = {'metadata': [('x-goog-request-params', 'parent=projects/python-docs-samples-tests/locations/us-central1'), ('x-goog-api-client', 'gl-python/3.10.5 grpc/1.51.1 gax/2.11.0 gapic/3.8.4')]}
@functools.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
      return callable_(*args, **kwargs)

.nox/py-3-10/lib/python3.10/site-packages/google/api_core/grpc_helpers.py:72:


self = <grpc._channel._UnaryUnaryMultiCallable object at 0x7f281974dff0>
request = parent: "projects/python-docs-samples-tests/locations/us-central1"
target_language_code: "fr-FR"
document_input_config...a78c8ab5a749762>\n ] >>\nstartxref\n88408\n%%EOF\n"
mime_type: "application/pdf"
}

timeout = None
metadata = [('x-goog-request-params', 'parent=projects/python-docs-samples-tests/locations/us-central1'), ('x-goog-api-client', 'gl-python/3.10.5 grpc/1.51.1 gax/2.11.0 gapic/3.8.4')]
credentials = None, wait_for_ready = None, compression = None

def __call__(self,
             request,
             timeout=None,
             metadata=None,
             credentials=None,
             wait_for_ready=None,
             compression=None):
    state, call, = self._blocking(request, timeout, metadata, credentials,
                                  wait_for_ready, compression)
  return _end_unary_response_blocking(state, call, False, None)

.nox/py-3-10/lib/python3.10/site-packages/grpc/_channel.py:946:


state = <grpc._channel._RPCState object at 0x7f281974cdf0>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7f28193cf000>
with_call = False, deadline = None

def _end_unary_response_blocking(state, call, with_call, deadline):
    if state.code is grpc.StatusCode.OK:
        if with_call:
            rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
            return state.response, rendezvous
        else:
            return state.response
    else:
      raise _InactiveRpcError(state)

E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.INVALID_ARGUMENT
E details = "Invalid document input received. Unsupported input file format."
E debug_error_string = "UNKNOWN:Error received from peer ipv4:173.194.202.95:443 {grpc_message:"Invalid document input received. Unsupported input file format.", grpc_status:3, created_time:"2022-12-07T14:51:45.913526127+00:00"}"
E >

.nox/py-3-10/lib/python3.10/site-packages/grpc/_channel.py:849: _InactiveRpcError

The above exception was the direct cause of the following exception:

capsys = <_pytest.capture.CaptureFixture object at 0x7f281974d270>

def test_translate_document(capsys):
  translate_v3beta1_translate_document.translate_document(project_id=PROJECT_ID, file_path=FILE_PATH)

translate_v3beta1_translate_document_test.py:26:


translate_v3beta1_translate_document.py:36: in translate_document
response = client.translate_document(
.nox/py-3-10/lib/python3.10/site-packages/google/cloud/translate_v3beta1/services/translation_service/client.py:884: in translate_document
response = rpc(
.nox/py-3-10/lib/python3.10/site-packages/google/api_core/gapic_v1/method.py:113: in call
return wrapped_func(*args, **kwargs)


args = (parent: "projects/python-docs-samples-tests/locations/us-central1"
target_language_code: "fr-FR"
document_input_confi...8c8ab5a749762>\n ] >>\nstartxref\n88408\n%%EOF\n"
mime_type: "application/pdf"
}
,)
kwargs = {'metadata': [('x-goog-request-params', 'parent=projects/python-docs-samples-tests/locations/us-central1'), ('x-goog-api-client', 'gl-python/3.10.5 grpc/1.51.1 gax/2.11.0 gapic/3.8.4')]}

@functools.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
        return callable_(*args, **kwargs)
    except grpc.RpcError as exc:
      raise exceptions.from_grpc_error(exc) from exc

E google.api_core.exceptions.InvalidArgument: 400 Invalid document input received. Unsupported input file format.

.nox/py-3-10/lib/python3.10/site-packages/google/api_core/grpc_helpers.py:74: InvalidArgument

Metadata

Metadata

Assignees

Labels

api: translateIssues related to the Cloud Translation API.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.samplesIssues that are directly related to samples.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