Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Airflow stack webserver failing to resolve postgres related attribute, fails to start

Airflow fails to start after deploying, error reports to be failing to resolve postgres attribute AttributeError: module 'sqlalchemy.dialects.postgresql' has no attribute 'MONEY'.

Dockerfile installing coupled dependencies as apache-airflow[async,postgres,celery,rabbitmq,crypto]==1.10 for the complete stack.

  File "/usr/local/bin/airflow", line 22, in <module>
    from airflow.bin.cli import CLIFactory
  File "/usr/local/lib/python3.6/site-packages/airflow/bin/cli.py", line 69, in <module>
    from airflow.www_rbac.app import cached_app as cached_app_rbac
  File "/usr/local/lib/python3.6/site-packages/airflow/www_rbac/app.py", line 24, in <module>
    from flask_appbuilder import AppBuilder, SQLA
  File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/__init__.py", line 5, in <module>
    from .base import AppBuilder
  File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/base.py", line 5, in <module>
    from .api.manager import OpenApiManager
  File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/api/__init__.py", line 11, in <module>
    from marshmallow_sqlalchemy.fields import Related, RelatedList
  File "/usr/local/lib/python3.6/site-packages/marshmallow_sqlalchemy/__init__.py", line 1, in <module>
    from .schema import TableSchemaOpts, ModelSchemaOpts, TableSchema, ModelSchema
  File "/usr/local/lib/python3.6/site-packages/marshmallow_sqlalchemy/schema.py", line 3, in <module>
    from .convert import ModelConverter
  File "/usr/local/lib/python3.6/site-packages/marshmallow_sqlalchemy/convert.py", line 36, in <module>
    class ModelConverter:
  File "/usr/local/lib/python3.6/site-packages/marshmallow_sqlalchemy/convert.py", line 52, in ModelConverter
    postgresql.MONEY: fields.Decimal,
AttributeError: module 'sqlalchemy.dialects.postgresql' has no attribute 'MONEY'```
like image 483
Wisani Salani Avatar asked Sep 25 '19 11:09

Wisani Salani


1 Answers

Allow airflow to select its own dependency version to the latest, apache-airflow[async,postgres,celery,rabbitmq,crypto].

like image 154
Wisani Salani Avatar answered Oct 03 '22 02:10

Wisani Salani