-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
When downloading a pre-translated document using is_xliff="false" the download_document attempts to decode the api response as UTF-8, which results in a UnicodeDecodeError.
To reproduce, upload a docx file for pretranslation. Once processed, download:
api_instance.download_document(job_id, is_xliff="false")
Observe the following error:
File "/path/to/src/lilt-pipeline-wrapper/venv/lib/python3.7/site-packages/lilt/api_client.py", line 205, in __call_api
response_data.data = response_data.data.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 10: invalid continuation byte
I found mention of a bytes response type at
lilt-python/lilt/api_client.py
Line 200 in 364b633
| if six.PY3 and response_type not in ["file", "bytes"]: |
Metadata
Metadata
Assignees
Labels
No labels