Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gnomeria opened this issue Apr 8, 2020 · 7 comments · May be fixed by #537
Open

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

gnomeria opened this issue Apr 8, 2020 · 7 comments · May be fixed by #537

Comments

@gnomeria
Copy link

gnomeria commented Apr 8, 2020

 [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 gnomeria changed the title Charts DataNoInspectionAvailable ERROR: Charts DataNoInspectionAvailable Apr 8, 2020
@gnomeria
Copy link
Author

gnomeria commented Apr 8, 2020

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.

@gnomeria gnomeria changed the title ERROR: Charts DataNoInspectionAvailable ERROR: No inspection system is available for object of type <class 'method'> Apr 8, 2020
@karvounis
Copy link

Good catch @gnomeria!

gnomeria referenced this issue in gnomeria/docker-airflow Apr 12, 2020
@gnomeria gnomeria linked a pull request Apr 12, 2020 that will close this issue
dinigo referenced this issue in dinigo/docker-airflow Apr 12, 2020
@AhmedAlZabidi
Copy link

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

@ashb
Copy link
Contributor

ashb commented Jun 8, 2020

This was fixed with 1.10.10 via apache/airflow#8230

@dsalaj
Copy link

dsalaj commented Jul 9, 2020

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?

@gnomeria
Copy link
Author

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:
#537 based on https://github.com/gnomeria/docker-airflow/tree/bump-airflow-1-10-10

@jmilagroso
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants