Hi James,
The error ValueError: Invalid connection string format
means the connection string in create_search_index.py
is incorrect
or not properly
formatted. This could happen if the connection string is missing, incorrect, or copied with extra spaces or missing parts. It may also be caused by using the wrong environment variable. Double-check the connection string in the Azure portal and ensure it's set correctly.
- Please check your connection string by going to the Azure Portal -> navigating to your AI Project (Azure AI Services or AI Foundry), find the correct connection string and ensure it follows the proper format.
endpoint=https://yourproject.region.ai.azure.com/;key=your-key
- Go to Azure Storage Account → Access Keys → Connection Strings in the Azure portal and copy the correct connection string. Then, update
create_search_index.py
by replacingyour-connection-string-here
with the correct connection string.
project = AIProjectClient.from_connection_string("your-connection-string-here")
- Check and set the environment variable in PowerShell by running
echo $Env:AZURE_AI_CONNECTION_STRING
If it's empty/wrong, set it again
$Env:AZURE_AI_CONNECTION_STRING = "your-connection-string-here"
Please check below documents to configure environment variables.
Please accept as "Yes" if the answer provided is useful, so that you can help others in the community looking for remediation for similar issues.
Let me know if you have any further Queries.