azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden'

Open manel00 opened this issue 1 year ago • 3 comments

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.

manel00 avatar May 24 '23 13:05 manel00

Same problem here. @manel00 Please, did you manage to solve it?

marceloricciardi avatar Jun 20 '23 18:06 marceloricciardi

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.

phlplowe9 avatar Jun 20 '23 22:06 phlplowe9

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.

akashtalole avatar Jun 24 '23 07:06 akashtalole

Pls check this comment if the above answers are working

Aravind03 avatar Jul 08 '23 17:07 Aravind03

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.

github-actions[bot] avatar Dec 23 '23 01:12 github-actions[bot]

Closing, assuming resolved.

pamelafox avatar Mar 08 '24 18:03 pamelafox