dosubot[bot] commented on issue #34441: URL: https://github.com/apache/superset/issues/34441#issuecomment-3142038901
<!-- Answer --> Superset reports that the attribute isn't found—even if it's defined in your superset_config.py—when the config file fails to load completely and without errors. Any syntax, import, or runtime error anywhere in superset_config.py (even unrelated to MyDashboardView) will prevent the module from being fully imported, so none of its attributes (including MyDashboardView) are available for dynamic import, resulting in the AttributeError you see. This is how Python module loading works, and Superset logs these failures during startup—check your logs for any import errors or exceptions during config loading for clues about what went wrong ["source"](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py). On top of that, Superset 5 no longer supports customizing the main IndexView using FAB_INDEX_VIEW in the config file. That pattern is now ignored, so even if your class is present, Superset won't use it. You must use FLASK_APP_MUTATOR to programmatically set appbuilder.indexview before views are registered ["source"](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/initialization/__init__.py). So: check your logs for config import errors, make sure superset_config.py loads without any errors, and migrate your IndexView customization to FLASK_APP_MUTATOR. If the config loads cleanly and you use the new pattern, your custom class will be picked up. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/43171c0f-9191-423c-9ed1-df0ecaadef32?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/43171c0f-9191-423c-9ed1-df0ecaadef32?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/43171c0f-9191-423c-9ed1-df0ecaadef32?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/43171c0f-9191-423c-9ed1-df0ecaadef32?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/43171c0f-9191-423c-9ed1-df0ecaadef32?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/43171c0f-9191-423c-9ed1-df0ecaadef32?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/43171c0f-9191-423c-9ed1-df0ecaadef32?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34441) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
