{"record":{"id":"016bd18e5bd45204","repo":"ytdl-org/youtube-dl","slug":"invalid-value-r-in-format-specification-r","errorCode":null,"errorMessage":"Invalid value %r in format specification %r","messagePattern":"Invalid value %r in format specification %r","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"youtube_dl/YoutubeDL.py","lineNumber":1251,"sourceCode":"            '=': operator.eq,\n            '!=': operator.ne,\n        }\n        operator_rex = re.compile(r'''(?x)\\s*\n            (?P<key>width|height|tbr|abr|vbr|asr|filesize|filesize_approx|fps)\n            \\s*(?P<op>%s)(?P<none_inclusive>\\s*\\?)?\\s*\n            (?P<value>[0-9.]+(?:[kKmMgGtTpPeEzZyY]i?[Bb]?)?)\n            $\n            ''' % '|'.join(map(re.escape, OPERATORS.keys())))\n        m = operator_rex.search(filter_spec)\n        if m:\n            try:\n                comparison_value = int(m.group('value'))\n            except ValueError:\n                comparison_value = parse_filesize(m.group('value'))\n                if comparison_value is None:\n                    comparison_value = parse_filesize(m.group('value') + 'B')\n                if comparison_value is None:\n                    raise ValueError(\n                        'Invalid value %r in format specification %r' % (\n                            m.group('value'), filter_spec))\n            op = OPERATORS[m.group('op')]\n\n        if not m:\n            STR_OPERATORS = {\n                '=': operator.eq,\n                '^=': lambda attr, value: attr.startswith(value),\n                '$=': lambda attr, value: attr.endswith(value),\n                '*=': lambda attr, value: value in attr,\n            }\n            str_operator_rex = re.compile(r'''(?x)\n                \\s*(?P<key>ext|acodec|vcodec|container|protocol|format_id|language)\n                \\s*(?P<negation>!\\s*)?(?P<op>%s)(?P<none_inclusive>\\s*\\?)?\n                \\s*(?P<value>[a-zA-Z0-9._-]+)\n                \\s*$\n                ''' % '|'.join(map(re.escape, STR_OPERATORS.keys())))\n            m = str_operator_rex.search(filter_spec)","sourceCodeStart":1233,"sourceCodeEnd":1269,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/YoutubeDL.py#L1233-L1269","documentation":"Companion to the getproperty error: the 'callpropertyvoid' / void-property branch in swfinterp only handles _ScopeDict method calls and list 'reverse'; any other (method, object) pair raises NotImplementedError('Unsupported (void) property %r on %r'). It fires when interpreted ActionScript invokes a mutating/side-effecting method whose result is discarded, and that method is not modeled.","triggerScenarios":"Bytecode executes a call whose return value is unused (callpropertyvoid) on an object the interpreter does not special-case — e.g. array.push(x), object property initialization, or a Vector append. Only reverse on plain Python lists is handled before the raise.","commonSituations":"Signature-scrambling players that build arrays with push()/splice() before reversing; any player update that adds a void call to the decipher routine; custom swfinterp experiments.","solutions":["Add an elif for the named method in the void-property branch of swfinterp.py (the error text tells you mname and the container type; e.g. push → obj.append(args[0])).","patch_function the enclosing ActionScript method with a Python equivalent so the void call never runs.","Update youtube-dl / move to yt-dlp where the routine is usually reimplemented natively."],"exampleFix":"# before (swfinterp.py, void-property branch)\nif mname == 'reverse':\n    assert isinstance(obj, list)\n    obj.reverse()\nelse:\n    raise NotImplementedError(...)\n\n# after\nif mname == 'reverse':\n    assert isinstance(obj, list)\n    obj.reverse()\nelif mname == 'push' and isinstance(obj, list):\n    for a in args:\n        obj.append(a)\nelse:\n    raise NotImplementedError(...)","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    out = func(args)\nexcept NotImplementedError as e:\n    if 'Unsupported (void) property' in str(e):\n        interpreter.patch_function(avm_class, caller_name,\n                                   lambda a: py_equivalent(a))\n        out = func(args)\n    else:\n        raise","preventionTips":["Add elif branches for void calls your players use (push, splice) next to the existing 'reverse' handler.","Patch the enclosing method in Python when the interpreter lacks a void builtin.","Track which SWF builds your code supports; new players can introduce new void calls overnight."],"tags":["swf","avm2","method-call","not-implemented"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}