azure-search-openai-demo
azure-search-openai-demo copied to clipboard
azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden'
Please provide us with the following information:
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
.../azure-search-openai-demo/app/backend$ python app.py
Any log messages given by the failure
Traceback (most recent call last): File ".../azure-search-openai-demo/app/backend/app.py", line 114, in chat r = impl.run(request.json["history"], request.json.get("overrides") or {}) File ".../azure-search-openai-demo/app/backend/approaches/chatreadretrieveread.py", line 85, in run results = [doc[self.sourcepage_field] + ": " + nonewlines(doc[self.content_field]) for doc in r] File ".../azure-search-openai-demo/app/backend/approaches/chatreadretrieveread.py", line 85, in
results = [doc[self.sourcepage_field] + ": " + nonewlines(doc[self.content_field]) for doc in r] File ".../azure-search-openai-demo/venv/lib/python3.10/site-packages/azure/search/documents/_paging.py", line 54, in next return next(self._page_iterator) File ".../azure-search-openai-demo/venv/lib/python3.10/site-packages/azure/core/paging.py", line 76, in next self._response = self._get_next(self.continuation_token) File ".../azure-search-openai-demo/venv/lib/python3.10/site-packages/azure/search/documents/_paging.py", line 114, in _get_next_cb return self._client.documents.search_post( File ".../azure-search-openai-demo/venv/lib/python3.10/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer return func(*args, **kwargs) File ".../azure-search-openai-demo/venv/lib/python3.10/site-packages/azure/search/documents/_generated/operations/_documents_operations.py", line 782, in search_post raise HttpResponseError(response=response, model=error) azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden'
Expected/desired behavior
The application runs as usual, but when I type on the chat whatever and I send it, It retrieves this error (I wrote for example 'dada')
OS and Version?
Ubuntu 22.10
azd version?
run
azd version
and copy paste here.
Versions
Mention any other details that might be useful
Thanks! We'll be in touch soon.
Same problem here. @manel00 Please, did you manage to solve it?
I had this once when I was playing around with a separate search service. The other search service didn't have any indexed data so I got this forbidden message. Switching back to my original search service by setting azd env set AZURE_SEARCH_SERVICE "original search service created by azd up" Then re-running start.ps1 or azd deploy depending on if you're running locally or in azure, resolved the issue for me.
Semantic search is not available for search service's tier (basic). This could be the reason for forbidden. semantic search requires Semantic search Standard tier (S1, S2, S3, S3 HD). azd up creates standard tier search service.
Pls check this comment
if the above answers are working
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.
Closing, assuming resolved.