docker-airflow icon indicating copy to clipboard operation
docker-airflow copied to clipboard

ERROR: No inspection system is available for object of type <class 'method'>

Open gnomeria opened this issue 4 years ago • 7 comments

 [2020-04-08 14:09:37,442] {{__init__.py:51}} INFO - Using executor CeleryExecutor
webserver_1  | [2020-04-08 14:09:37,442] {{dagbag.py:403}} INFO - Filling up the DagBag from /usr/local/airflow/dags
webserver_1  | Traceback (most recent call last):
webserver_1  |   File "/usr/local/bin/airflow", line 37, in <module>
webserver_1  |     args.func(args)
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/airflow/utils/cli.py", line 75, in wrapper
webserver_1  |     return f(*args, **kwargs)
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/airflow/bin/cli.py", line 900, in webserver
webserver_1  |     app = cached_app_rbac(None) if settings.RBAC else cached_app(None)
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/airflow/www/app.py", line 233, in cached_app
webserver_1  |     app = create_app(config, testing)
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/airflow/www/app.py", line 103, in create_app
webserver_1  |     models.Chart, Session, name="Charts", category="Data Profiling"))
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/flask_admin/contrib/sqla/view.py", line 330, in __init__
webserver_1  |     menu_icon_value=menu_icon_value)
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/flask_admin/model/base.py", line 818, in __init__
webserver_1  |     self._refresh_cache()
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/flask_admin/model/base.py", line 913, in _refresh_cache
webserver_1  |     self._search_supported = self.init_search()
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/flask_admin/contrib/sqla/view.py", line 581, in init_search
webserver_1  |     if tools.is_hybrid_property(self.model, name):
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/flask_admin/contrib/sqla/tools.py", line 209, in is_hybrid_property
webserver_1  |     return last_name in get_hybrid_properties(last_model)
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/flask_admin/contrib/sqla/tools.py", line 190, in get_hybrid_properties
webserver_1  |     for key, prop in inspect(model).all_orm_descriptors.items()
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/sqlalchemy/inspection.py", line 72, in inspect
webserver_1  |     "available for object of type %s" % type_
webserver_1  | sqlalchemy.exc.NoInspectionAvailable: No inspection system is available for object of type <class 'method'>

gnomeria avatar Apr 08 '20 14:04 gnomeria

Found the solution to this is to pin the SQLAlchemy==1.3.15 from https://github.com/apache/airflow/issues/8211 This is recent issue, and I'll keep this issue open for users who might find it.

gnomeria avatar Apr 08 '20 14:04 gnomeria

Good catch @gnomeria!

karvounis avatar Apr 09 '20 07:04 karvounis

Found the solution to this is to pin the SQLAlchemy==1.3.15 from apache/airflow#8211 This is recent issue, and I'll keep this issue open for users who might find it.

I have uninstalled SQLAlchemy==1.3.16 then installed SQLAlchemy==1.3.15 as the following: pip uninstall -y SQLAlchemy
&& pip install SQLAlchemy==1.3.15

It worked well without issues

AhmedAlZabidi avatar Apr 16 '20 11:04 AhmedAlZabidi

This was fixed with 1.10.10 via https://github.com/apache/airflow/pull/8230

ashb avatar Jun 08 '20 08:06 ashb

Ok, so extending the Dockerfile to pip uninstall/install the right SQLAlchemy version works. But it's an ugly workaround. Can someone post how fix this by specifying the new airflow version where this was fixed?

dsalaj avatar Jul 09 '20 12:07 dsalaj

Ok, so extending the Dockerfile to pip uninstall/install the right SQLAlchemy version works. But it's an ugly workaround. Can someone post how fix this by specifying the new airflow version where this was fixed?

You can actually just set the new airflow version, like my unmerged pr here: https://github.com/puckel/docker-airflow/pull/537 based on https://github.com/gnomeria/docker-airflow/tree/bump-airflow-1-10-10

gnomeria avatar Jul 10 '20 10:07 gnomeria

Found the solution to this is to pin the SQLAlchemy==1.3.15 from apache/airflow#8211 This is recent issue, and I'll keep this issue open for users who might find it.

Thanks @gnomeria

jmilagroso avatar Nov 25 '20 02:11 jmilagroso