You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/02/20 07:35:33 UTC

[GitHub] [superset] yzliao-zip opened a new issue #18823: Authlib package is missing from flask app builder installation

yzliao-zip opened a new issue #18823:
URL: https://github.com/apache/superset/issues/18823


   Authlib package, which is needed for oauth in flaks app builder, is missing in the installation. The reason is that `authlib` is installed as the extra package of flask app builder. See https://github.com/dpgaspar/Flask-AppBuilder/blob/v3.4.3/setup.py#L73.
   
   In this tutorial, https://superset.apache.org/docs/installation/running-on-kubernetes#setting-up-oauth, we assume the authlib is installed.
   
   #### How to reproduce the bug
   1. add the following lines in config.py
   ```
   from flask_appbuilder.security.manager import (AUTH_OAUTH, AUTH_DB)
   AUTH_TYPE = AUTH_OAUTH
   ```
   2. install superset with the updated config.py
   
   ### Expected results
   
   The system is running without error
   
   ### Actual results
   
   ```
   2022-02-20 07:32:17,019:ERROR:superset.app:Failed to create app                                                                │
   │ Traceback (most recent call last):                                                                                             │
   │   File "/app/superset/app.py", line 37, in create_app                                                                          │
   │     app_initializer.init_app()                                                                                                 │
   │   File "/app/superset/initialization/__init__.py", line 569, in init_app                                                       │
   │     self.init_app_in_ctx()                                                                                                     │
   │   File "/app/superset/initialization/__init__.py", line 517, in init_app_in_ctx                                                │
   │     self.configure_fab()                                                                                                       │
   │   File "/app/superset/initialization/__init__.py", line 609, in configure_fab                                                  │
   │     appbuilder.init_app(self.superset_app, db.session)                                                                         │
   │   File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/base.py", line 202, in init_app                                │
   │     self.sm = self.security_manager_class(self)                                                                                │
   │   File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/security/sqla/manager.py", line 54, in __init__                │
   │     super(SecurityManager, self).__init__(appbuilder)                                                                          │
   │   File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/security/manager.py", line 263, in __init__                    │
   │     from authlib.integrations.flask_client import OAuth                                                                        │
   │ ModuleNotFoundError: No module named 'authlib'
   ```
   This package authlib is imported here: https://github.com/dpgaspar/Flask-AppBuilder/blob/v3.4.3/flask_appbuilder/security/manager.py#L263
   
   #### Screenshots
   
   If applicable, add screenshots to help explain your problem.
   
   
   ### Environment
   
   - superset version: 1.4.1
   - python version : 3.8
   
   (please complete the following information):
   
   - browser type and version:
   - superset version: `superset version`
   - python version: `python --version`
   - node.js version: `node -v`
   - any feature flags active:
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   
   


-- 
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-unsubscribe@superset.apache.org

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



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


[GitHub] [superset] villebro commented on issue #18823: Authlib package is missing from flask app builder installation

Posted by GitBox <gi...@apache.org>.
villebro commented on issue #18823:
URL: https://github.com/apache/superset/issues/18823#issuecomment-1047630013


   Since `Authlib` is an optional dependency, I suggest addressing this in the following way:
   - possibly adding an `extras_require` to `setup.py`
   - adding a note to the docs that `Authlib` is required when setting up OAuth
   
   @dpgaspar thoughts?


-- 
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-unsubscribe@superset.apache.org

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



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