Reported upstream as https://github.com/flask-admin/flask-admin/issues/1976

On Apr 8 2020, at 9:37 pm, Wesley Hill <wh...@yext.com.INVALID> wrote:

> (I created an Apache JIRA account to try report this there, but in the
> Create Issue dialog box the Airflow project was not among the many options.)
> 
> Airflow version: 1.10.9
> 
> Description: A rebuild of the docker image we use to run Airflow upgraded
> the version of SQLAlchemy to 1.3.16, which causes the following exception
> when starting the airflow webserver:
> 
> Traceback (most recent call last):
>  File "/usr/local/bin/airflow", line 37, in <module>
>    args.func(args)
>  File "/usr/local/lib/python3.7/site-packages/airflow/utils/cli.py", line
> 75, in wrapper
>    return f(*args, **kwargs)
>  File "/usr/local/lib/python3.7/site-packages/airflow/bin/cli.py", line
> 900, in webserver
>    app = cached_app_rbac(None) if settings.RBAC else cached_app(None)
>  File "/usr/local/lib/python3.7/site-packages/airflow/www/app.py", line
> 233, in cached_app
>    app = create_app(config, testing)
>  File "/usr/local/lib/python3.7/site-packages/airflow/www/app.py", line
> 103, in create_app
>    models.Chart, Session, name="Charts", category="Data Profiling"))
>  File
> "/usr/local/lib/python3.7/site-packages/flask_admin/contrib/sqla/view.py",
> line 330, in __init__
>    menu_icon_value=menu_icon_value)
>  File "/usr/local/lib/python3.7/site-packages/flask_admin/model/base.py",
> line 818, in __init__
>    self._refresh_cache()
>  File "/usr/local/lib/python3.7/site-packages/flask_admin/model/base.py",
> line 913, in _refresh_cache
>    self._search_supported = self.init_search()
>  File
> "/usr/local/lib/python3.7/site-packages/flask_admin/contrib/sqla/view.py",
> line 581, in init_search
>    if tools.is_hybrid_property(self.model, name):
>  File
> "/usr/local/lib/python3.7/site-packages/flask_admin/contrib/sqla/tools.py",
> line 209, in is_hybrid_property
>    return last_name in get_hybrid_properties(last_model)
>  File
> "/usr/local/lib/python3.7/site-packages/flask_admin/contrib/sqla/tools.py",
> line 190, in get_hybrid_properties
>    for key, prop in inspect(model).all_orm_descriptors.items()
>  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/inspection.py",
> line 72, in inspect
>    "available for object of type %s" % type_
> sqlalchemy.exc.NoInspectionAvailable: No inspection system is
> available for
> object of type <class 'method'>
> 
> 
> Specifying SQLAlchemy <= 1.3.15 in the requirements.txt file we use to
> build the docker image fixes the issue. Our requirements.txt file now looks
> like this:
> 
> apache-airflow[crypto,mysql,slack] == 1.10.9
> pendulum == 1.4.4
> requests >= 2.20.0, < 3
> SQLAlchemy <= 1.3.15
> 
> 
> Our Dockerfile is based on python:3.7-slim
> 
> Hopefully that lets somebody reproduce the issue. Let me know if
> there's a
> way I can submit this bug on JIRA instead, or if there's anything else I
> can do to help.
> 
> Regards,
> Wesley Hill
> wh...@yext.com
> 

Reply via email to