For anyone running into this, until the fix in the linked github issue is resolved:
The docs indicate that beginning May 12 2023 older duckduckgo versions will not work. I thought the update (-U) flag in !pip install -Uqq duckduckgo_search would pull the latest version but either it didn’t for some reason or a regression was introduced in a later version.
At any rate, explicitly asking for a version worked for me:
I got {“code”:“DeploymentFailed”,“target”:“/subscriptions/03eef13f-3f60-4106-9c3c-ec622619d84c/resourceGroups/searchforfastaicourse/providers/Microsoft.Resources/deployments/Microsoft.BingSearch-20230518084223”,“message”:“At least one resource deployment operation failed. Please list deployment operations for details. Please see Deployment history - Azure Resource Manager | Microsoft Learn for usage details.”,“details”:[{“code”:“InsufficientQuota”,“message”:“Insufficient Quota”}]}
eve though I chose free tier
@jsk123 , @rosh-eth and others who are running into this issue, I struggled with it as well and finally found that importing fastbook and using ‘search_images_ddg’ is what got everything to work in the end.
I’ve documented what I did in a kaggle notebook in the hope that it can help others get through this. I found this issue quite frustrating until I finally got it to work.
Thanks, this was the only solution that worked for me (or at least first one – I’ll stop digging now )
What did not work:
Upgrading duckduckgo_search to >= 2.9.4, even 3.3.0 failed with HTTP 403 forbidden, although the same URL worked when used within the browser. Might be the User-Agent header that is used in fastai’s util function.
Fixing the deprecation warning and using DDGS(), same error in request library call.
Restarting the kernel because some caching apparently prevented the usage of the updated/changed library, so using a working library version might still fail (but no version of plain duckduckgo_search fixed my problem).