{"record":{"id":"870403a49e5ff483","repo":"ScrapeGraphAI/Scrapegraph-ai","slug":"missing-proxy-servers-for-criteria","errorCode":null,"errorMessage":"missing proxy servers for criteria","messagePattern":"missing proxy servers for criteria","errorType":"exception","errorClass":"FreeProxyException","httpStatus":null,"severity":"error","filePath":"scrapegraphai/utils/proxy_rotation.py","lineNumber":127,"sourceCode":"                return list(positive)\n\n            except requests.exceptions.RequestException:\n                continue\n\n        n = len(positive)\n\n        if n < k and search_outside:\n            proxybroker.country_id = None\n\n            try:\n                negative = set(search_all(proxybroker, k - n, False))\n            except FreeProxyException:\n                negative = set()\n\n            positive = positive | negative\n\n        if not positive:\n            raise FreeProxyException(\"missing proxy servers for criteria\")\n\n        return list(positive)\n\n    return search_all(proxybroker, max_shape, search_outside_if_empty)\n\n\ndef _parse_proxy(proxy: ProxySettings) -> ProxySettings:\n    \"\"\"parses a proxy configuration with known server\n\n    Args:\n        proxy: The proxy configuration to parse.\n\n    Returns:\n        A 'playwright' compliant proxy configuration.\n    \"\"\"\n    assert \"server\" in proxy, \"missing server in the proxy configuration\"\n\n    auhtorization = [x in proxy for x in (\"username\", \"password\")]","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/532dfffbf6ee823a6c9cf8cfedc24a93bf026780/scrapegraphai/utils/proxy_rotation.py#L109-L145","documentation":"FreeProxyException from search_all in the proxy-rotation utility: the proxy search (via proxybroker or the free-proxy fallback) found zero servers matching the configured criteria (protocol/ anonymity/location/etc.).","triggerScenarios":"Calling search_proxy_servers/search_all with restrictive criteria (e.g. HTTPS + specific country + high anonymity) when the search returns no matches; also raised when search_outside_if_empty finds nothing outside the criteria.","commonSituations":"Rotating free proxies with very narrow filters; upstream proxy lists temporarily depleted or blocked; network egress blocked so all lookups fail.","solutions":["Relax criteria (drop country/anonymity filters or allow HTTP)","Pass specific proxy servers in config instead of searching free ones for production use","Catch FreeProxyException and retry with search_outside_if_empty=True or fall back to direct connection","Check network egress / DNS if searches consistently return nothing"],"exampleFix":"# before\nconfig = {\"proxy\": {\"search\": True, \"criteria\": {\"protocol\": \"https\", \"country\": \"de\"}}}\n# after\nconfig = {\"proxy\": {\"server\": \"http://user:pass@gate.nodemaven.com:8080\"}}","handlingStrategy":"fallback","validationCode":"try:\n    proxies = search_proxy_servers(criteria)\nexcept FreeProxyException:\n    proxies = []","typeGuard":null,"tryCatchPattern":"from scrapegraphai.utils.proxy_rotation import search_proxy_servers\nfrom proxy_rotation_lib import FreeProxyException\ntry:\n    proxies = search_proxy_servers(criteria)\nexcept FreeProxyException as e:\n    logger.warning(\"no free proxies: %s; going direct\", e)\n    proxies = []  # skip proxy rotation","preventionTips":["Use paid/static proxy servers in config for production","Relax filters when counts drop to zero","Don't rely on free proxy availability for reliability"],"tags":["proxy","network","free-proxy"],"backgroundTag":"no-proxies-found","analyzedSha":"532dfffbf6ee823a6c9cf8cfedc24a93bf026780","analyzedAt":"2026-08-28T15:19:38.821Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}