{"record":{"id":"1fb1461334c24601","repo":"ytdl-org/youtube-dl","slug":"no-such-python-version-s","errorCode":null,"errorMessage":"No such Python version: %s","messagePattern":"No such Python version: (.+?)","errorType":"http","errorClass":"BuildError","httpStatus":500,"severity":"error","filePath":"devscripts/buildserver.py","lineNumber":287,"sourceCode":"class PythonBuilder(object):\n    def __init__(self, **kwargs):\n        python_version = kwargs.pop('python', '3.4')\n        python_path = None\n        for node in ('Wow6432Node\\\\', ''):\n            try:\n                key = compat_winreg.OpenKey(\n                    compat_winreg.HKEY_LOCAL_MACHINE,\n                    r'SOFTWARE\\%sPython\\PythonCore\\%s\\InstallPath' % (node, python_version))\n                try:\n                    python_path, _ = compat_winreg.QueryValueEx(key, '')\n                finally:\n                    compat_winreg.CloseKey(key)\n                break\n            except Exception:\n                pass\n\n        if not python_path:\n            raise BuildError('No such Python version: %s' % python_version)\n\n        self.pythonPath = python_path\n\n        super(PythonBuilder, self).__init__(**kwargs)\n\n\nclass GITInfoBuilder(object):\n    def __init__(self, **kwargs):\n        try:\n            self.user, self.repoName = kwargs['path'][:2]\n            self.rev = kwargs.pop('rev')\n        except ValueError:\n            raise BuildError('Invalid path')\n        except KeyError as e:\n            raise BuildError('Missing mandatory parameter \"%s\"' % e.args[0])\n\n        path = os.path.join(os.environ['APPDATA'], 'Build archive', self.repoName, self.user)\n        if not os.path.exists(path):","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/devscripts/buildserver.py#L269-L305","documentation":"Raised by youtube-dl's bundled SOCKS client when a SOCKS5 proxy rejects username/password authentication (the proxy replies with a status other than success after the RFC 1929 USERPASS handshake). The message 'general SOCKS server failure' maps to Socks5Error.ERR_GENERAL_FAILURE and is youtube-dl's generic signal that the proxy refused the credentials or the auth exchange. It surfaces as a DownloadError from the downloader layer, with the SOCKS details in the cause chain.","triggerScenarios":"Setting a socks5:// (or socks5h://) proxy via --proxy, socks_proxy env var, or the proxy parameter, where the proxy expects username/password auth and the supplied proxy.username/proxy.password are wrong, missing, or not accepted. Also triggered when the proxy's auth reply is malformed (version byte mismatch is caught separately; a non-success status byte lands here).","commonSituations":"Typos in proxy credentials in config (~-/.config/youtube-dl/config), credentials containing special characters that were not URL-encoded in the proxy URL (e.g. user:pa%40ss vs user:pass@), rotating/expired proxy credentials, or a proxy that requires a different auth method than USERPASS while partially advertising it. Version changes: newer proxies disabling legacy username/password auth.","solutions":["Verify the proxy credentials by testing the same socks5 URL with curl: curl -x socks5h://user:pass@host:port https://example.com — if curl also fails, fix the credentials/proxy side first.","URL-encode special characters in the username/password inside the proxy URL (e.g. @ as %40, : as %3A).","Confirm you are using the right scheme: socks5h:// lets the proxy resolve DNS and avoids local-resolution side failures; plain socks5:// resolves locally.","Check that the proxy actually supports SOCKS5 username/password auth (some proxies are SOCKS4 or expect no auth — try omitting credentials).","Update youtube-dl / switch to yt-dlp; the PySocks-based client and error reporting have been improved there."],"exampleFix":"# before\nydl_opts = {'proxy': 'socks5://user:p@ss:word@10.0.0.1:1080'}\n\n# after (percent-encode the password: p@ss:word -> p%40ss%3Aword)\nydl_opts = {'proxy': 'socks5://user:p%40ss%3Aword@10.0.0.1:1080'}","handlingStrategy":"validation","validationCode":"from urllib.parse import urlparse\n\ndef validate_socks_proxy(url):\n    p = urlparse(url)\n    if p.scheme not in ('socks5', 'socks5h'):\n        return False, 'not a socks5 proxy URL'\n    if p.username and (p.username != urlparse(url).username or ':' in (p.password or '')):\n        pass\n    # credentials must be percent-encoded before embedding\n    import re\n    if '@' in url and re.search(r'(?<!%)[@:]', url.split('://', 1)[1].rsplit('@', 1)[0]):\n        return False, 'unescaped @ or : in userinfo — percent-encode credentials'\n    return True, p.netloc","typeGuard":null,"tryCatchPattern":"from youtube_dl.utils import DownloadError\ntry:\n    ydl.download([url])\nexcept DownloadError as e:\n    if 'general SOCKS server failure' in str(e):\n        # credential/proxy-side problem — retrying unchanged will not help\n        raise SystemExit('Check SOCKS5 proxy credentials: %s' % e)","preventionTips":["Percent-encode special characters in proxy usernames/passwords inside the proxy URL.","Smoke-test the proxy with curl -x socks5h://... before wiring it into youtube-dl options.","Prefer socks5h:// so DNS goes through the proxy and avoids local-resolution mismatches.","Keep proxy credentials in one place (config file) so a rotation cannot leave stale copies."],"tags":["network","proxy","socks","authentication"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}