While the thread is initflow initflow, the AttributeError: module 'object has no attribute' client_auth '
I recently installed apache airflow 1.8.1 by running the following command:
airflow initdb
which returned the following error:
Traceback (most recent call last):
File "/usr/bin/airflow", line 18, in <module>
from airflow.bin.cli import CLIFactory
File "/usr/lib/python2.7/dist-packages/airflow/bin/cli.py", line 65, in <module>
auth=api.api_auth.client_auth)
AttributeError: 'module' object has no attribute 'client_auth'
I tried several solutions but it doesn't work.
I figured out what we were doing wrong. The field auth_backend=airflow.contrib.auth.backends.password_auth
must be under webserver
, not under api
. Add it if it doesn't already exist. For auth_backend
there are several fields, as there are authenticate
, etc.
I had the same error with airflow 1.8.1 with python 2.7.11.
I disabled webserver authentication (temporarily) and switched to the default for auth_backend. (which solved the problem)
The final configuration in my airflow.cfg looks like this
auth_backend = airflow.api.auth.backend.default
authenticate = False