From 665c6743ad8f1aafc2eba5394768b8aec5a833c0 Mon Sep 17 00:00:00 2001 From: Luciano Martins Date: Thu, 1 Sep 2022 16:36:22 -0300 Subject: [PATCH] docs(samples): fixing file saving for local documents translation (#419) Co-authored-by: Anthonios Partheniou --- .../samples/snippets/translate_v3beta1_translate_document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-translate/samples/snippets/translate_v3beta1_translate_document.py b/packages/google-cloud-translate/samples/snippets/translate_v3beta1_translate_document.py index 963d1d87acf9..23b14f3f73da 100644 --- a/packages/google-cloud-translate/samples/snippets/translate_v3beta1_translate_document.py +++ b/packages/google-cloud-translate/samples/snippets/translate_v3beta1_translate_document.py @@ -43,7 +43,7 @@ def translate_document(project_id: str, file_path: str): # To output the translated document, uncomment the code below. # f = open('/tmp/output', 'wb') - # f.write(response.document_translation.byte_stream_outputs) + # f.write(response.document_translation.byte_stream_outputs[0]) # f.close() # If not provided in the TranslationRequest, the translated file will only be returned through a byte-stream