question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Unable to import any Knowledge base via the custom question answering Import API

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nisarkhan916commented, May 25, 2022

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.

0reactions
nisarkhan916commented, May 25, 2022

Thanks for the time and help @rokulka & @heaths.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to import any Knowledge base via the custom ...
The Question Answering Projects - Import is not uploading the file instead giving Response Code: 202 and when checked for the import status ......
Read more >
Migrate from QnA Maker to custom question answering
Migrate your legacy QnAMaker knowledge bases to custom question answering to take advantage of the latest features.
Read more >
API export and import - Invalid OpenAPI input.
I run into an error when trying to import a API definition in JSON format via the AWS CLI. The file I try...
Read more >
Azure Cognitive Language Services Question Answering ...
Use it to build a knowledge base by extracting questions and answers from your semi-structured content, including FAQ, manuals, and documents.
Read more >
Review and troubleshoot import errors
Below, learn how to resolve errors detected during an import, download an error file, view error details, and correct issues in your import...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found