[BUG] Unable to import any Knowledge base via the custom question answering Import API
See original GitHub issueLibrary 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:
- Tried to upload tsv, xlsx, tsv as Zip, xlsx as Zip.
- Tried to upload file which is exported from Language studio Custom question answering (attaching the screenshot below)
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
Issue Analytics
- State:
- Created a year ago
- Comments:16 (8 by maintainers)
Top GitHub 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 theImportJobOptions
object in the JSON.Thanks for the time and help @rokulka & @heaths.