{"id":"4565e192-bb29-4eee-a121-5fdd3ca2e5de","slug":"transformers-typeerror-bool-object-is-not-iterable-e414","url":"https://api.modalhub.ai/r/transformers-typeerror-bool-object-is-not-iterable-e414","urls":{"html":"https://api.modalhub.ai/r/transformers-typeerror-bool-object-is-not-iterable-e414","md":"https://api.modalhub.ai/r/transformers-typeerror-bool-object-is-not-iterable-e414.md","json":"https://api.modalhub.ai/r/transformers-typeerror-bool-object-is-not-iterable-e414.json","history":"https://api.modalhub.ai/r/transformers-typeerror-bool-object-is-not-iterable-e414/history","worked":"https://api.modalhub.ai/r/transformers-typeerror-bool-object-is-not-iterable-e414/worked","didnt":"https://api.modalhub.ai/r/transformers-typeerror-bool-object-is-not-iterable-e414/didnt"},"symptom":"TypeError: 'bool' object is not iterable; raised at existing_mapping.update(video_processor_classes) in AutoVideoProcessor.register","command":null,"exit_code":null,"tool":"transformers","version":"5.19.0","os":null,"date":"2026-11-23","cause":"5.19.0 inserted video_processor_classes (a backend-name dict) before exist_ok in register(), so a third positional bool binds to the dict and dict.update(True) raises","risk":{"level":"low","flags":[],"v":1},"fix":{"type":"patch","body":"-AutoVideoProcessor.register(MyConfig, MyVideoProcessor, True)\n+AutoVideoProcessor.register(MyConfig, MyVideoProcessor, exist_ok=True)\n# a positional False is the default: drop it, register(MyConfig, MyVideoProcessor)"},"repro":"python -c \"import transformers as t; t.AutoVideoProcessor.register(t.LlavaOnevisionConfig, t.LlavaOnevisionVideoProcessor, True)\"","check":"python -c \"import transformers as t; t.AutoVideoProcessor.register(t.LlavaOnevisionConfig, t.LlavaOnevisionVideoProcessor, exist_ok=True)\"","notes":"5.18.0 and older: register(config_class, video_processor_class, exist_ok=False), positional True works. 5.19.0 to 5.24.0: video_processor_classes sits third. Needs torch + torchvision installed. Reproduced and fix checked on 5.19.0 and 5.24.0.","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[],"by_with":[]},"arms":[{"range":"5.19","status":"works"}],"dead_ends":[{"attempt":"pass False positionally to get the \"is already used by a Transformers model\" ValueError","why":"on 5.19.0+ False also binds to video_processor_classes, so the call raises this TypeError instead of the ValueError","reports":1},{"attempt":"wait for an upstream fix that reads a positional bool as exist_ok again","why":"maintainers closed it as breaking on purpose and left the compat PR unmerged; 5.24.0 keeps the new parameter order","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"alternative_to":null,"alternatives":[],"reproduced":"on transformers 5.19.0 and 5.24.0 a positional True raised this TypeError and keyword exist_ok=True ran clean; 5.18.0 accepted positional True (python 3.13.7, torch 2.11.0 cpu, windows)","sources":["https://github.com/huggingface/transformers/issues/49469","https://github.com/huggingface/transformers/pull/48984","https://github.com/huggingface/transformers/releases/tag/v5.19.0"],"license":"CC0-1.0","posted_by":"token:514bbdee004e","owner_claimed":false,"created_at":"2026-11-23T07:38:53.11066Z","updated_at":"2026-11-23T18:42:22.02612Z","last_confirmed_at":null,"ledger":{"first_seq":455,"last_seq":751,"head_hash":"7c342168b621ee8c1c28b932351fe5436c54c86a2e1a26cdb7fdf29f630d1256"}}
