{"record":{"id":"4252d876650626e6","repo":"unclecode/crawl4ai","slug":"the-fit-html-attribute-is-deprecated-and-has-bee","errorCode":null,"errorMessage":"The 'fit_html' attribute is deprecated and has been removed. Please use 'markdown.fit_html' instead.","messagePattern":"The 'fit_html' attribute is deprecated and has been removed\\. Please use 'markdown\\.fit_html' instead\\.","errorType":"exception","errorClass":"AttributeError","httpStatus":null,"severity":"error","filePath":"crawl4ai/models.py","lineNumber":242,"sourceCode":"            \"\"\"\n        )\n    \n    @property\n    def fit_markdown(self):\n        \"\"\"\n        Deprecated property that raises an AttributeError when accessed.\n        \"\"\"\n        raise AttributeError(\n            \"The 'fit_markdown' attribute is deprecated and has been removed. \"\n            \"Please use 'markdown.fit_markdown' instead.\"\n        )\n    \n    @property\n    def fit_html(self):\n        \"\"\"\n        Deprecated property that raises an AttributeError when accessed.\n        \"\"\"\n        raise AttributeError(\n            \"The 'fit_html' attribute is deprecated and has been removed. \"\n            \"Please use 'markdown.fit_html' instead.\"\n        )\n\n    def model_dump(self, *args, **kwargs):\n        \"\"\"\n        Override model_dump to include the _markdown private attribute in serialization.\n        \n        This override is necessary because:\n        1. PrivateAttr fields are excluded from serialization by default\n        2. We need to maintain backward compatibility by including the 'markdown' field\n           in the serialized output\n        3. We're transitioning from 'markdown_v2' to enhancing 'markdown' to hold\n           the same type of data\n        \n        Future developers: This method ensures that the markdown content is properly\n        serialized despite being stored in a private attribute. If the serialization\n        requirements change, this is where you would update the logic.","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/unclecode/crawl4ai/blob/7e801521428ee12509994d39151006f64055ebe3/crawl4ai/models.py#L224-L260","documentation":"Error \"The 'fit_html' attribute is deprecated and has been removed. Please use 'markdown.fit_html' instead.\" thrown in unclecode/crawl4ai.","triggerScenarios":"Thrown at crawl4ai/models.py:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use result.markdown.fit_html instead of the removed fit_html attribute."],"exampleFix":"fit_html = result.markdown.fit_html","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7e801521428ee12509994d39151006f64055ebe3","analyzedAt":"2026-08-14T20:46:20.673Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}