{"record":{"id":"aadf9c3a3bf09c47","repo":"OpenBMB/ChatDev","slug":"expected-skill-entry-mapping-or-string","errorCode":null,"errorMessage":"expected skill entry mapping or string","messagePattern":"expected skill entry mapping or string","errorType":"validation","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"entity/configs/node/skills.py","lineNumber":175,"sourceCode":"    def _coerce_allow_entries(value: Any, *, field_path: str) -> List[str]:\n        if value is None:\n            return []\n        if not isinstance(value, list):\n            raise ConfigError(\"expected list of skill entries\", field_path)\n\n        result: List[str] = []\n        for idx, item in enumerate(value):\n            item_path = f\"{field_path}[{idx}]\"\n            if isinstance(item, str):\n                normalized = item.strip()\n                if normalized:\n                    result.append(normalized)\n                continue\n            if isinstance(item, Mapping):\n                entry = AgentSkillSelectionConfig.from_dict(item, path=item_path)\n                result.append(entry.name)\n                continue\n            raise ConfigError(\"expected skill entry mapping or string\", item_path)\n        return result\n","sourceCodeStart":157,"sourceCodeEnd":177,"githubUrl":"https://github.com/OpenBMB/ChatDev/blob/4fb2db0ea90375ce1059f44fe03ffbd191a7a169/entity/configs/node/skills.py#L157-L177","documentation":"Inside the allow list, each item must be either a string or a Mapping (parsed via AgentSkillSelectionConfig); anything else (int, bool, null, nested list) raises ConfigError('expected skill entry mapping or string') at '<path>[idx]'.","triggerScenarios":"allow: [1, true, null, [a]] — any non-string/non-mapping list element.","commonSituations":"YAML unquoted numbers/booleans intended as names (e.g. 42 as a skill name); nulls from sparse data; nested lists from templating bugs.","solutions":["Quote names that look like numbers/booleans: - '42'","Remove null or nested-list entries","Ensure templating always emits strings or mappings per element"],"exampleFix":"# before\nallow:\n  - 42\n# after\nallow:\n  - '42'","handlingStrategy":"validation","validationCode":"for i, item in enumerate(allow_list):\n    assert isinstance(item, (str, dict)), f'entry {i} must be string or mapping'","typeGuard":"def is_valid_allow_item(v) -> bool:\n    return isinstance(v, (str, dict))","tryCatchPattern":"try:\n    SkillsConfig.from_dict(d, path='skills')\nexcept ConfigError as e:\n    if 'mapping or string' in str(e):\n        d['allow'] = [str(x) for x in d['allow']]\n        SkillsConfig.from_dict(d, path='skills')","preventionTips":["Quote numeric-looking skill names in YAML","Filter nulls from generated allow lists"],"tags":["skills","config","validation"],"backgroundTag":"invalid-config-value-type","analyzedSha":"4fb2db0ea90375ce1059f44fe03ffbd191a7a169","analyzedAt":"2026-08-27T14:35:29.622Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}