-
Notifications
You must be signed in to change notification settings - Fork 140
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
Fix synchronous translation code sample error. #148
base: main
Are you sure you want to change the base?
Conversation
Synchronous translation code sample for python is run in error. Propose to fix those errors.
@k-in : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Learn Build status updates of commit da0171b: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Can you review the proposed changes? Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
Learn Build status updates of commit da0171b: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
This pull request has been inactive for at least 14 days. If you are finished with your changes, don't forget to sign off. See the contributor guide for instructions. |
This pull request includes changes to the
sample_single_document_translation
function in thearticles/ai-services/translator/document-translation/quickstarts/includes/sdk/python.md
file. The changes improve the handling of file paths and the saving of the translated document.Improvements to file handling:
os.path.path.basename
toos.path.basename
."r"
(read) to"rb"
(read binary) to correctly read the contents of the document.Enhancements to translation response handling:
translated-document.docx
.Synchronous translation code sample for python is run in error. Propose to fix those errors.