{"record":{"id":"2e70bd5de2aba4b3","repo":"babysor/MockingBird","slug":"no-encoder-models-found-in-s","errorCode":null,"errorMessage":"No encoder models found in %s","messagePattern":"No encoder models found in (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"control/toolbox/ui.py","lineNumber":343,"sourceCode":"    \n    @property\n    def current_vocoder_fpath(self):\n        return self.vocoder_box.itemData(self.vocoder_box.currentIndex())\n\n    @property\n    def current_extractor_fpath(self):\n        return self.extractor_box.itemData(self.extractor_box.currentIndex())\n\n    @property\n    def current_convertor_fpath(self):\n        return self.convertor_box.itemData(self.convertor_box.currentIndex())\n\n    def populate_models(self, encoder_models_dir: Path, synthesizer_models_dir: Path, \n                        vocoder_models_dir: Path, extractor_models_dir: Path, convertor_models_dir: Path, vc_mode: bool):\n        # Encoder\n        encoder_fpaths = list(encoder_models_dir.glob(\"*.pt\"))\n        if len(encoder_fpaths) == 0:\n            raise Exception(\"No encoder models found in %s\" % encoder_models_dir)\n        self.repopulate_box(self.encoder_box, [(f.stem, f) for f in encoder_fpaths])\n        \n        if vc_mode:\n            # Extractor\n            extractor_fpaths = list(extractor_models_dir.glob(\"*.pt\"))\n            if len(extractor_fpaths) == 0:\n                self.log(\"No extractor models found in %s\" % extractor_fpaths)\n            self.repopulate_box(self.extractor_box, [(f.stem, f) for f in extractor_fpaths])\n            \n            # Convertor\n            convertor_fpaths = list(convertor_models_dir.glob(\"*.pth\"))\n            if len(convertor_fpaths) == 0:\n                self.log(\"No convertor models found in %s\" % convertor_fpaths)\n            self.repopulate_box(self.convertor_box, [(f.stem, f) for f in convertor_fpaths])\n        else:\n            # Synthesizer\n            synthesizer_fpaths = list(synthesizer_models_dir.glob(\"**/*.pt\"))\n            if len(synthesizer_fpaths) == 0:","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/babysor/MockingBird/blob/28dc5e14f12d7c754612af2fde8e78a4b03f8616/control/toolbox/ui.py#L325-L361","documentation":"Raised by the Toolbox UI when populating model dropdowns: the encoder models directory contains zero *.pt files. Unlike the mkgui guards this triggers even when the folder exists but is empty, and it hard-crashes the toolbox (called from reset_ui at startup).","triggerScenarios":"Starting the Toolbox (in normal or VC mode) with an encoder models directory that exists but has no .pt checkpoints (or pointing at the wrong directory).","commonSituations":"User downloaded models but left checkpoints in Downloads/zip; models placed one level too deep or with wrong extension; folder created but empty.","solutions":["Put at least one encoder .pt checkpoint directly in the encoder models directory","Re-check the 'models directory' setting in the Toolbox UI / config and point it at the folder that actually contains encoder .pt files","Re-extract the pretrained models archive, preserving directory structure"],"exampleFix":"# before: encoder models dir empty\n cp ~/Downloads/encoder.pt  /path/to/encoder/saved_models/\n# after: toolbox starts, encoder dropdown lists 'encoder'","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef has_models(d: Path, pattern: str = '*.pt') -> bool:\n    return d.is_dir() and len(list(d.glob(pattern))) > 0\n\nassert has_models(encoder_models_dir), f'No encoder .pt files in {encoder_models_dir}'","typeGuard":null,"tryCatchPattern":"try:\n    ui.populate_models(...)\nexcept Exception as e:\n    show_dialog(str(e)); sys.exit(1)  # keep toolbox from hard-crashing silently","preventionTips":["Verify each models dir contains matching files before launching the toolbox","Keep checkpoints at the exact glob depth the UI expects (*.pt directly in dir)","Ship a setup script that validates the models tree"],"tags":["python","toolbox","models","filesystem","ui"],"backgroundTag":"missing-model-files","analyzedSha":"28dc5e14f12d7c754612af2fde8e78a4b03f8616","analyzedAt":"2026-08-27T02:26:53.589Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}