azure-sdk-for-net: [BUG] Unable to import any Knowledge base via the custom question answering Import API

Library name and version

Cognitive Services - 2021-10-01

Describe the bug

The Question Answering Projects - Import is not uploading the file instead giving Response Code: 202 and when checked for the import status then getting the below error

{
 "createdDateTime": "2022-04-27T10:59:38+00:00",
 "expirationDateTime": "2022-04-27T16:59:38+00:00",
 "jobId": "xx365d1f-xxxx-xxx-xxx-xxxxx",
 "lastUpdatedDateTime": "2022-04-27T10:59:38+00:00",
 "status": "failed",
 "errors": [
   {
     "code": "Unspecified",
     "message": "Something happened. Please retry after some time."
   }
 ]
}

Note:

  1. Tried to upload tsv, xlsx, tsv as Zip, xlsx as Zip.
  2. Tried to upload file which is exported from Language studio Custom question answering (attaching the screenshot below) image

Expected behavior

It should upload the Excel or tsv file which contains the QnA pairs and the QnA pairs should be reflected in Language Studio Custom question answering project.

Actual behavior

Import Response Code: 202

Import Job Status { "createdDateTime": "2022-04-27T10:59:38+00:00", "expirationDateTime": "2022-04-27T16:59:38+00:00", "jobId": "xxxxxx-xxxx-xxxx-xxx-xxxxxxx", "lastUpdatedDateTime": "2022-04-27T10:59:38+00:00", "status": "failed", "errors": [ { "code": "Unspecified", "message": "Something happened. Please retry after some time." } ] }

Reproduction Steps

Import CURL curl -X POST -H "Ocp-Apim-Subscription-Key: {API-KEY}" -H "Content-Type: application/json" -d '{ "ImportJobOptions": {"fileUri": "FILE-URI-PATH"} }' -i 'https://{ENDPOINT}.api.cognitive.microsoft.com/language/query-knowledgebases/projects/{PROJECT-NAME}/:import?api-version=2021-10-01&format=tsv'

Import Status CURL curl -X GET -H "Ocp-Apim-Subscription-Key: {API-KEY}" -H "Content-Type: application/json" -d '' 'https://southcentralus.api.cognitive.microsoft.com/language/query-knowledgebases/projects/{PROJECT-NAME}/import/jobs/{JOB-ID-GUID}?api-version=2021-10-01'

Environment

  • VS 19
  • Dot Net
  • Language Studio Portal

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

Hey @rokulka, Thanks a lot it is working when i remove the ImportJobOptions. I had referred CURL from the Authoring API and this has the ImportJobOptions object in the JSON.