{"record":{"id":"ed027ce6e4c3bc09","repo":"subframe7536/maple-font","slug":"unkown-feature-feature-tag","errorCode":null,"errorMessage":"Unkown feature: {feature.tag}","messagePattern":"Unkown feature: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"source/py/feature/ast.py","lineNumber":584,"sourceCode":"\ndef clone_empty(feature: FeatureWithDocs, desc_prefix: str = \"\"):\n    if isinstance(feature, CharacterVariant):\n        return CharacterVariant(\n            id=feature.id,\n            desc=desc_prefix + EMPTY_FEAT_SYMBOL + feature.desc,\n            content=EMPTY_FEAT_CONTENT,\n            version=feature.version,\n            example=feature.example,\n        )\n    if isinstance(feature, StylisticSet):\n        return StylisticSet(\n            id=feature.id,\n            desc=desc_prefix + EMPTY_FEAT_SYMBOL + feature.desc,\n            content=EMPTY_FEAT_CONTENT,\n            version=feature.version,\n            example=feature.example,\n        )\n    raise Exception(f\"Unkown feature: {feature.tag}\")\n\n\ndef filter_empty(features: list[FeatureWithDocs], full: bool):\n    if full:\n        return features\n\n    return list(filter(lambda x: EMPTY_FEAT_SYMBOL not in x.desc, features))\n","sourceCodeStart":566,"sourceCodeEnd":592,"githubUrl":"https://github.com/subframe7536/maple-font/blob/c08fda97fef73d68c1755219852150770f6e6578/source/py/feature/ast.py#L566-L592","documentation":"clone_empty() creates placeholder (empty) copies of documented features, but it only knows how to clone Character Variants and Stylistic Sets feature types; anything else (e.g. a base Feature, FeatureWithDocs subtype it doesn't recognize, or cv00/ss00 tags it can't parse) falls through to a generic Exception. The message is misspelled 'Unkown' in the source. It is raised by cv_list_italic, cv_list_regular, and ss_list_regular when building the empty-variant feature lists.","triggerScenarios":"Calling cv_list_italic/cv_list_regular/ss_list_regular with a features list containing feature objects whose tag isn't a recognizable cvXX/ssXX documented-feature type — e.g. passing plain Feature or FeatureWithDocs instances, or a custom subclass.","commonSituations":"Mixing custom feature classes into the list passed to the list builders; refactoring feature classes so a type is no longer an instance of the expected CharacterVariants/StylisticSets classes; passing full features instead of documented ones.","solutions":["Pass only Character Variants / Stylistic Sets feature instances to the cv_list_* / ss_list_* builders.","Check feature.tag is a valid cvXX/ssXX tag and the object is of the expected class before adding it to the list.","If you added a new documented-feature type, extend clone_empty() in source/py/feature/ast.py to handle it."],"exampleFix":"// before\ncv_list_regular(my_features + [my_custom_feature])\n// after\ncloneable = [f for f in my_features if f.tag.startswith(('cv', 'ss'))]\ncv_list_regular(cloneable)","handlingStrategy":"validation","validationCode":"def only_cloneable(features):\n    return [f for f in features if f.tag.startswith(('cv', 'ss')) and isinstance(f, FeatureWithDocs)]\n\ncv_list_regular(only_cloneable(features), full=full)","typeGuard":"def is_cloneable_feature(f) -> bool:\n    return isinstance(f, FeatureWithDocs) and (f.tag.startswith('cv') or f.tag.startswith('ss'))","tryCatchPattern":"try:\n    empties = cv_list_regular(features)\nexcept Exception as e:\n    if str(e).startswith('Unkown feature:'):\n        tag = str(e).rsplit(': ', 1)[1]\n        logging.warning(f'skipping non-clonable feature {tag}')\n        empties = cv_list_regular([f for f in features if f.tag != tag])\n    else:\n        raise","preventionTips":["Only pass CharacterVariants/StylisticSets instances to the *_list builders.","Filter custom feature classes out before calling cv_list_*/ss_list_*.","After refactoring feature class hierarchies, re-check isinstance checks in clone_empty()."],"tags":["python","exception","feature-cloning","unsupported-type","fea-generation"],"backgroundTag":"unsupported-feature-type","analyzedSha":"c08fda97fef73d68c1755219852150770f6e6578","analyzedAt":"2026-08-28T22:07:29.503Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}