paulsonkevgit opened a new issue, #34575:
URL: https://github.com/apache/superset/issues/34575

   ### Bug description
   
   I updated the superset_config.py so as to show a diffrent page via the 
follwoing code (Only a small snippet has implemented other things like RLS,  
OAuth etc too in the config file - BUT THE ERROR SHOWS THAT THE Superset config 
file doesnt contain the Attribute "SupersetDashboardIndexView", its clearly 
defined in the file.)
   
   THE EXACT SAME COD EUSED TO WORK ON 4.1.1 version but during migration to 
5.0.0  the issue occured....
   
   from flask_appbuilder import expose, IndexView
   from superset.superset_typing import FlaskResponse
   
   class SupersetDashboardIndexView(IndexView):
       @expose("/")
       def index(self) -> FlaskResponse:
           session.pop('_flashes', None)
           return redirect("/dashboard/list/")
       
   
   FAB_INDEX_VIEW = 
f"{SupersetDashboardIndexView.__module__}.{SupersetDashboardIndexView.__name__}"
   
==================================================================================================================================================================
   ERROR
   But it shos the below error:::
   2025-08-02 05:28:39,794:ERROR:flask_appbuilder.base:module 'superset_config' 
has no attribute 'SupersetDashboardIndexView'
   Traceback (most recent call last):
     File "/app/.venv/lib/python3.11/site-packages/flask_appbuilder/base.py", 
line 52, in dynamic_class_import
       return reduce(getattr, tmp[1:], package)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: module 'superset_config' has no attribute 
'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:An error occurred when 
importing declared addon superset_config.SupersetDashboardIndexView: module 
'superset_config' has no attribute 'SupersetDashboardIndexView'
   2025-08-02 05:28:39,794:ERROR:flask_appbuilder.base:module 'superset_config' 
has no attribute 'SupersetDashboardIndexView'
   Traceback (most recent call last):
     File "/app/.venv/lib/python3.11/site-packages/flask_appbuilder/base.py", 
line 52, in dynamic_class_import
       return reduce(getattr, tmp[1:], package)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: module 'superset_config' has no attribute 
'SupersetDashboardIndexView'
   2025-08-02 05:28:39,794:ERROR:flask_appbuilder.base:module 'superset_config' 
has no attribute 'SupersetDashboardIndexView'
   Traceback (most recent call last):
     File "/app/.venv/lib/python3.11/site-packages/flask_appbuilder/base.py", 
line 52, in dynamic_class_import
       return reduce(getattr, tmp[1:], package)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: module 'superset_config' has no attribute 
'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:An error occurred when 
importing declared addon superset_config.SupersetDashboardIndexView: module 
'superset_config' has no attribute 'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:An error occurred when 
importing declared addon superset_config.SupersetDashboardIndexView: module 
'superset_config' has no attribute 'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:module 'superset_config' 
has no attribute 'SupersetDashboardIndexView'
   Traceback (most recent call last):
     File "/app/.venv/lib/python3.11/site-packages/flask_appbuilder/base.py", 
line 52, in dynamic_class_import
       return reduce(getattr, tmp[1:], package)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: module 'superset_config' has no attribute 
'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:module 'superset_config' 
has no attribute 'SupersetDashboardIndexView'
   Traceback (most recent call last):
     File "/app/.venv/lib/python3.11/site-packages/flask_appbuilder/base.py", 
line 52, in dynamic_class_import
       return reduce(getattr, tmp[1:], package)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: module 'superset_config' has no attribute 
'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:An error occurred when 
importing declared addon superset_config.SupersetDashboardIndexView: module 
'superset_config' has no attribute 'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:module 'superset_config' 
has no attribute 'SupersetDashboardIndexView'
   Traceback (most recent call last):
     File "/app/.venv/lib/python3.11/site-packages/flask_appbuilder/base.py", 
line 52, in dynamic_class_import
       return reduce(getattr, tmp[1:], package)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: module 'superset_config' has no attribute 
'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:An error occurred when 
importing declared addon superset_config.SupersetDashboardIndexView: module 
'superset_config' has no attribute 'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:module 'superset_config' 
has no attribute 'SupersetDashboardIndexView'
   Traceback (most recent call last):
     File "/app/.venv/lib/python3.11/site-packages/flask_appbuilder/base.py", 
line 52, in dynamic_class_import
       return reduce(getattr, tmp[1:], package)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: module 'superset_config' has no attribute 
'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:An error occurred when 
importing declared addon superset_config.SupersetDashboardIndexView: module 
'superset_config' has no attribute 'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:An error occurred when 
importing declared addon superset_config.SupersetDashboardIndexView: module 
'superset_config' has no attribute 'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:module 'superset_config' 
has no attribute 'SupersetDashboardIndexView'
   Traceback (most recent call last):
     File "/app/.venv/lib/python3.11/site-packages/flask_appbuilder/base.py", 
line 52, in dynamic_class_import
       return reduce(getattr, tmp[1:], package)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: module 'superset_config' has no attribute 
'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:An error occurred when 
importing declared addon superset_config.SupersetDashboardIndexView: module 
'superset_config' has no attribute 'SupersetDashboardIndexView'
   2025-08-02 05:28:39,795:ERROR:flask_appbuilder.base:module 'superset_config' 
has no attribute 'SupersetDashboardIndexView'
   Traceback (most recent call last):
     File "/app/.venv/lib/python3.11/site-packages/flask_appbuilder/base.py", 
line 52, in dynamic_class_import
       return reduce(getattr, tmp[1:], package)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: module 'superset_config' has no attribute 
'SupersetDashboardIndexView'
   2025-08-02 05:28:39,796:ERROR:flask_appbuilder.base:An error occurred when 
importing declared addon superset_config.SupersetDashboardIndexView: module 
'superset_config' has no attribute 'SupersetDashboardIndexView'
   2025-08-02 05:28:39,797:INFO:superset.initialization:Setting database 
isolation level to READ COMMITTED
   2025-08-02 05:28:39,799:ERROR:flask_appbuilder.base:module 'superset_config' 
has no attribute 'SupersetDashboardIndexView'
   Traceback (most recent call last):
     File "/app/.venv/lib/python3.11/site-packages/flask_appbuilder/base.py", 
line 52, in dynamic_class_import
       return reduce(getattr, tmp[1:], package)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: module 'superset_config' has no attribute 
'SupersetDashboardIndexView'
   2025-08-02 05:28:39,800:ERROR:flask_appbuilder.base:An error occurred when 
importing declared addon superset_config.SupersetDashboardIndexView: module 
'superset_config' has no attribute 'SupersetDashboardIndexView'
   2025-08-02 05:28:40,051:INFO:superset.utils.screenshots:No PIL installation 
found
   
   
   WHATS THIS RELATED TO ???
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   5.0.0
   
   ### Python version
   
   3.11
   
   ### Node version
   
   18 or greater
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
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: notifications-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to