Azure/aistudio-copilot-sample

Step 3: Build an Azure Search index fails

hugobarona opened this issue · 3 comments

I tried to run all steps but got stuck on step 3.

image

exception logs: System.NullReferenceException: Object reference not set to an instance of an object.
at Azure.AI.Details.Common.CLI.PythonRunner.RunEmbeddedPythonScript(ICommandValues values, String scriptName, String scriptArgs, Dictionary2 addToEnvironment, Action1 stdOutHandler, Action1 stdErrHandler, Action1 mergedOutputHandler) in /mnt/vss/_work/1/s/src/common/details/helpers/python_runner.cs:line 75
at Azure.AI.Details.Common.CLI.PythonSDKWrapper.UpdateMLIndex(ICommandValues values, String subscription, String group, String projectName, String indexName, String embeddingModelDeployment, String embeddingModelName, String dataFiles, String externalSourceUrl) in /mnt/vss/_work/1/s/src/common/details/ai_python_generative_sdk/python_sdk_wrapper.cs:line 86
at Azure.AI.Details.Common.CLI.SearchCommand.DoIndexUpdateWithGenAi(String subscription, String groupName, String projectName, String indexName, String embeddingModelDeployment, String embeddingModelName, String dataFiles, String externalSourceUrl) in /mnt/vss/_work/1/s/src/ai/commands/search_command.cs:line 164
at Azure.AI.Details.Common.CLI.SearchCommand.DoIndexUpdate() in /mnt/vss/_work/1/s/src/ai/commands/search_command.cs:line 144
at Azure.AI.Details.Common.CLI.SearchCommand.DoCommand(String command) in /mnt/vss/_work/1/s/src/ai/commands/search_command.cs:line 74
at Azure.AI.Details.Common.CLI.SearchCommand.RunSearchCommand() in /mnt/vss/_work/1/s/src/ai/commands/search_command.cs:line 63
at Azure.AI.Details.Common.CLI.SearchCommand.RunCommand() in /mnt/vss/_work/1/s/src/ai/commands/search_command.cs:line 50
at Azure.AI.Details.Common.CLI.AiProgramData.DispatchRunCommand(ICommandValues values) in /mnt/vss/_work/1/s/src/ai/Program_AI.cs:line 113
at Azure.AI.Details.Common.CLI.Program.DispatchRunCommand(ICommandValues values) in /mnt/vss/_work/1/s/src/common/Program.cs:line 361
at Azure.AI.Details.Common.CLI.CommandRunDispatcher.DispatchRunCommand(ICommandValues values, Queue1 queue, Boolean expandOk, Boolean parallelOk) in /mnt/vss/_work/1/s/src/common/details/commands/command.cs:line 62 at Azure.AI.Details.Common.CLI.Command.RunCommandsInProc(Queue1 queue) in /mnt/vss/_work/1/s/src/common/details/commands/command.cs:line 586
at Azure.AI.Details.Common.CLI.Command.<>c__DisplayClass20_0.b__0() in /mnt/vss/_work/1/s/src/common/details/commands/command.cs:line 570
at Azure.AI.Details.Common.CLI.Command.CheckExpectedOutputAsync(ICommandValues values, Queue1 queue, Func1 func) in /mnt/vss/_work/1/s/src/common/details/commands/command.cs:line 554
at Azure.AI.Details.Common.CLI.Command.CheckExpectedRunInProcAsync(ICommandValues values, Queue`1 queue) in /mnt/vss/_work/1/s/src/common/details/commands/command.cs:line 570

I am having an issue at a similar step, except that I am getting an error about missing the --search-api-key even though I am providing the parameter:

>  ai search index update --search-api-key  "[redacted]" --files "./data/3-product-info/*.md"   --index-name "product-info" --project-name robk-test-project --group rk-test-rg-eastus2

Updating search index 'product-info' ...
  ERROR: Updating search index; requires search api key.

    TRY: ai config search --set api.key KEY
     OR: ai search index update --search-api-key KEY

    SEE: ai help search index update

any update on this issue, I am also facing similar issue

I am having the same issue as @qubitron. I specify the --search-api-key but it is not recognized. I tried setting the configuration for the api.key before running the "ai search index update" but it had no effect.

ai config search --set api.key "0Kl***IFZ"

Is there any workaround?