Closed rcs-phamax closed 2 years ago
Hi @rcs-phamax
Update: I was able to reproduce this issue.
I get the same error message:
Unknown error during execution. Please file an issue on https://github.com/microsoft/botframework-cli/issues
Converting circular structure to JSON
--> starting at object with constructor 'Socket'
| property '_httpMessage' -> object with constructor 'ClientRequest'
--- property 'socket' closes the circle
@munozemilio can you investigate this one?
Hello @rcs-phamax could you please try with NO endpoint flag:
bf qnamaker:kb:export --kbId --subscriptionKey --environment prod --qnaFormat > qna_export.qna
OR
bf qnamaker:kb:export --kbId --subscriptionKey --environment prod > qna_export.json
@rcs-phamax, any updates?
Thanks to @munozemilio's suggestion, I was able to run bf qnamaker:kb:export
without issues.
Hi @ramfattah , thank you for the help, but @munozemilio 's approach was actually my initial approach which kept throwing me a 401 error, only after which I started explicitly providing the endpoint, below is the screengrab of the error I get:
Please note that the same KB-ID and sub-key works fine and is currently in use with multiple bots so there's no doubt regarding the key as the error points.
Hi @rcs-phamax, thanks for the update; what endpoint are you providing?
Hi @ramfattah I've tried with following as endpoints, yeilding same result of 401 error,
Hello @rcs-phamax, thanks so much for the quick reply. Let me provide a bit of context. The qna maker commands are a wrapper of the qna maker v4.0 api...Here you can find a testing console where you can try the parameters directly. Its weird that your resource is not found by the default endpoint. The endpoint you commented above is only for the generate answer operation. The one you have to use for the export operation should look something like this:
https://resource-name.cognitiveservices.azure.com/qnamaker/v4.0/
Where resource name can be found in the Azure Portal.
Let me know if that helps
Thank you so much @munozemilio , this was of great help. Even though the original issue remains, I've got the info required to get .qna file. So this is wrap from my side here. Also to those who might face a similar issue, quickest option is to have a simple py-script to convert CSV export of QnA-KB to .qna or JSON format.
Versions
CLI version : 4.15.0 win32-x64 Nodejs version : 14.15.0 command-line interpreters : Windows Power Shell OS : Windows 10
Describe the bug
Trying to run the BF-CLI command to export the QnA-Maker KB which throws an Unknown isuue.
Command : bf qnamaker:kb:export --endpoint --kbId --subscriptionKey --environment prod --qnaFormat > qna_export.qna
OR
bf qnamaker:kb:export --endpoint --kbId --subscriptionKey --environment prod > qna_export.json
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The Command is supposed to connect to the atrget QnA-Maker Knowledge Base and export the KB in either JSON or QNA format to STDOUT. Instead command is throwing an "Unknown Issue" instantly
Screenshots
Additional context
Here's the issue response on running the command : Unknown error during execution. Please file an issue on https://github.com/microsoft/botframework-cli/issues Converting circular structure to JSON --> starting at object with constructor 'Socket' | property '_httpMessage' -> object with constructor 'ClientRequest' --- property 'socket' closes the circle
Here's the Documentation I followed : https://www.npmjs.com/package/@microsoft/botframework-cli#bf-qnamakerkbexport [bug]