Changing to that URL doesn't work anymore.
It has been a year and this is still not fixed. When will Microsoft ever get to fixing this issue with the SDK?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm following the quickstart code here: https://learn.microsoft.com/en-us/azure/cognitive-services/bing-web-search/quickstarts/client-libraries?pivots=programming-language-python
I'm using a Bing Resource with the Free Tier.
The endpoint I'm using is https://api.bing.microsoft.com/
When I hit web_data = client.web.search(query="Yosemite")
, I receive the following error:
Traceback (most recent call last):
File "
Changing to that URL doesn't work anymore.
It has been a year and this is still not fixed. When will Microsoft ever get to fixing this issue with the SDK?
I resolved the issue. The problem lies in the following file: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/cognitiveservices/azure-cognitiveservices-search-websearch/azure/cognitiveservices/search/websearch/operations/_web_operations.py.
I changed url = self._client.format_url(url, **path_format_arguments)
to url = path_format_arguments['Endpoint']
and the problem has been resolved. I've also submitted a PR, hoping they'll merge it asap.
The documentation across Bing and Azure search remains a mess - broken links, conflicting advice and ChatGPT gets lost trying to use Bing to help give accurate answers.
Maybe MS doesn't really want anyone using API's outside .NET?