Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
5.89k stars 4.03k forks source link

Error in environments with existing integrated vectorization enabled #1408

Open pamelafox opened 6 months ago

pamelafox commented 6 months ago

This error happens when you re-run prepdocs.sh:

Traceback (most recent call last):
  File "/workspaces/azure-search-openai-demo/./scripts/prepdocs.py", line 483, in <module>
    loop.run_until_complete(main(ingestion_strategy, setup_index=not args.remove and not args.removeall))
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/workspaces/azure-search-openai-demo/./scripts/prepdocs.py", line 221, in main
    await strategy.setup()
  File "/workspaces/azure-search-openai-demo/scripts/prepdocslib/integratedvectorizerstrategy.py", line 159, in setup
    await ds_client.create_or_update_data_source_connection(data_source_connection)
  File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.11/site-packages/azure/core/tracing/decorator_async.py", line 77, in wrapper_use_tracer
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.11/site-packages/azure/search/documents/indexes/aio/_search_indexer_client.py", line 367, in create_or_update_data_source_connection
    result = await self._client.data_sources.create_or_update(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.11/site-packages/azure/core/tracing/decorator_async.py", line 77, in wrapper_use_tracer
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.11/site-packages/azure/search/documents/indexes/_generated/aio/operations/_data_sources_operations.py", line 248, in create_or_update
    map_error(status_code=response.status_code, response=response, error_map=error_map)
  File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.11/site-packages/azure/core/exceptions.py", line 164, in map_error
    raise error
azure.core.exceptions.ResourceExistsError: () There was a conflicting update. No change was made to the resource from this request.

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Create an environment with integrated vectorization enabled Re-run prepdocs.sh

pamelafox commented 4 months ago

@srbalakr I'm still getting this, should we just try/except?

DuboisABB commented 2 months ago

I'm also getting this error. Any tips for a workaround?

pamelafox commented 2 months ago

I typically just comment out those last few lines of code. I've asked @srbalakr to take a look, however.

egor-yudkin commented 2 weeks ago

Getting the same issue... @pamelafox which lines exactly do you comment out?