Getting Issue while invoking Azure Document Translation Service through Python Code.. <InvalidDocumentAccessLevel>

Kiran Manjrekar 1 Reputation point
2022-10-13T14:42:14.787+00:00

Hello,
I am getting below error message while trying to translate PDF documents with Azure Document Translation Service through Python API call.
Getting below error message -
""
Setting up container level SAS URL's for both Source and target container configuration (with valid expiry datetime).
Storage account and Translator Service are both behind Private Endpoints.
Still getting above error message. Please help to resolve.

Sample Code:

==========================

inputs = [
DocumentTranslationInput(
source_url = source_container_sas_url,
targets=[
TranslationTarget(
target_url = target_container_sas_url,
language="en"
)
]
)
]

poller = client.begin_translation(inputs)  
result = poller.result()
Azure Translator
Azure Translator
An Azure service to easily conduct machine translation with a simple REST API call.
340 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,372 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,611 Reputation points
    2022-10-14T12:32:24.327+00:00

    @Kiran Manjrekar Thanks for the question. Can you please add more details about the resource and status code getting.
    make sure you're using the Translator single-service resource not the Cognitive Services multi-service resource.

    0 comments No comments