{"record":{"id":"71b721d8ba2e5bc2","repo":"ytdl-org/youtube-dl","slug":"invalid-repository-s","errorCode":null,"errorMessage":"Invalid repository \"%s\"","messagePattern":"Invalid repository \"(.+?)\"","errorType":"http","errorClass":"BuildError","httpStatus":500,"severity":"error","filePath":"devscripts/buildserver.py","lineNumber":329,"sourceCode":"\n\nclass GITBuilder(GITInfoBuilder):\n    def build(self):\n        try:\n            subprocess.check_output(['git', 'clone', 'git://github.com/%s/%s.git' % (self.user, self.repoName), self.buildPath])\n            subprocess.check_output(['git', 'checkout', self.rev], cwd=self.buildPath)\n        except subprocess.CalledProcessError as e:\n            raise BuildError(e.output)\n\n        super(GITBuilder, self).build()\n\n\nclass YoutubeDLBuilder(object):\n    authorizedUsers = ['fraca7', 'phihag', 'rg3', 'FiloSottile', 'ytdl-org']\n\n    def __init__(self, **kwargs):\n        if self.repoName != 'youtube-dl':\n            raise BuildError('Invalid repository \"%s\"' % self.repoName)\n        if self.user not in self.authorizedUsers:\n            raise HTTPError('Unauthorized user \"%s\"' % self.user, 401)\n\n        super(YoutubeDLBuilder, self).__init__(**kwargs)\n\n    def build(self):\n        try:\n            proc = subprocess.Popen([os.path.join(self.pythonPath, 'python.exe'), 'setup.py', 'py2exe'], stdin=subprocess.PIPE, cwd=self.buildPath)\n            proc.wait()\n            #subprocess.check_output([os.path.join(self.pythonPath, 'python.exe'), 'setup.py', 'py2exe'],\n            #                        cwd=self.buildPath)\n        except subprocess.CalledProcessError as e:\n            raise BuildError(e.output)\n\n        super(YoutubeDLBuilder, self).build()\n\n\nclass DownloadBuilder(object):","sourceCodeStart":311,"sourceCodeEnd":347,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/devscripts/buildserver.py#L311-L347","documentation":"Raised while parsing an ABC (ActionScript Byte Code) file inside a SWF: a class 'trait' entry has a kind byte outside the values swfinterp understands (0x00 slot/const variants are consumed earlier; 0x01-0x03 method/getter/setter, 0x04 class, 0x05 function). Any other kind — e.g. 0x06 const — aborts parsing with this ExtractorError. It means the SWF uses an ABC feature youtube-dl's interpreter never implemented.","triggerScenarios":"SWFInterpreter.parse_abc walks the instance_info/class_info trait tables; when it encounters a trait kind byte it does not have an elif branch for, it raises. Triggered by SWFs compiled with const traits or tooling that emits rare trait kinds (0x06 CONST, 0x0B-0x0F metadata-attributed variants can also fall through).","commonSituations":"A site rotates its player SWF and the new build contains a const trait on a class; youtube-dl then fails at parse time for that extractor's deciphering step. Extremely rare for direct API users; almost always hit via an extractor that interprets a remote SWF.","solutions":["Update youtube-dl or move to yt-dlp — the extractor likely no longer needs the SWF at all.","As a patch, extend the kind dispatch in swfinterp.py: treat unknown kinds as opaque (consume slot_id via u30()) instead of raising, since traits you never call can be skipped.","Use patch_function()/extract_class() only for the class you need after teaching the parser to skip unsupported traits.","Reimplement the specific ActionScript logic (usually a signature scrambling function) in Python instead of interpreting the SWF."],"exampleFix":"# before (swfinterp.py, parse_traits_info)\nelse:\n    raise ExtractorError('Unsupported trait kind %d' % kind)\n\n# after: skip traits we do not need\nelse:\n    u30()  # slot_id — ignore unsupported trait kinds\n\n# then continue to the metadata handling below","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"from youtube_dl.utils import ExtractorError\ntry:\n    interpreter = SWFInterpreter(swf_bytes)\nexcept ExtractorError as e:\n    if 'Unsupported trait kind' in str(e):\n        # SWF uses ABC traits this interpreter cannot parse;\n        # fall back to a native reimplementation of the needed function\n        return native_implementation()\n    raise","preventionTips":["Treat swfinterp as best-effort: always keep a non-SWF fallback path for signature computation.","Patch unknown trait kinds to be skipped instead of fatal if you only need a few classes.","Pin known-good player SWF versions in tests so a trait-kind regression is caught before release."],"tags":["swf","abc","parser","not-implemented"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}