title: Airflow db init ERROR - Failed to add operation for GET /api/v1/connections
body: <p>I am trying to install Airflow 2.0.1 with ansible on CentOS8 machine. Python version 3.8.1. I made pip 20.2.4 as suggested in Airflow docs.</p>
  <p>I am using postgresql and <code>airflow db check</code> is successful. But the db init task gives the following error. I tried <code>airflow  db init</code> manually but the result was the same:</p>
  <pre><code>ERROR - Failed to add operation for GET /api/v1/connections
  Traceback (most recent call last):
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/apis/abstract.py&quot;, line 209, in add_paths
      self.add_operation(path, method)
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/apis/abstract.py&quot;, line 162, in add_operation
      operation = make_operation(
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/operations/__init__.py&quot;, line 8, in make_operation
      return spec.operation_cls.from_spec(spec, *args, **kwargs)
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/operations/openapi.py&quot;, line 128, in from_spec
      return cls(
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/operations/openapi.py&quot;, line 75, in __init__
      super(OpenAPIOperation, self).__init__(
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/operations/abstract.py&quot;, line 96, in __init__
      self._resolution = resolver.resolve(self)
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/resolver.py&quot;, line 40, in resolve
      return Resolution(self.resolve_function_from_operation_id(operation_id), operation_id)
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/resolver.py&quot;, line 66, in resolve_function_from_operation_id
      raise ResolverError(str(e), sys.exc_info())
  connexion.exceptions.ResolverError: &lt;ResolverError: columns&gt;
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/opt/airflow/bin/airflow&quot;, line 8, in &lt;module&gt;
      sys.exit(main())
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/__main__.py&quot;, line 40, in main
      args.func(args)
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/cli/cli_parser.py&quot;, line 48, in command
      return func(*args, **kwargs)
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/cli/commands/db_command.py&quot;, line 31, in initdb
      db.initdb()
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/utils/db.py&quot;, line 549, in initdb
      upgradedb()
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/utils/db.py&quot;, line 684, in upgradedb
      command.upgrade(config, 'heads')
    File &quot;/opt/airflow/lib/python3.8/site-packages/alembic/command.py&quot;, line 294, in upgrade
      script.run_env()
    File &quot;/opt/airflow/lib/python3.8/site-packages/alembic/script/base.py&quot;, line 490, in run_env
      util.load_python_file(self.dir, &quot;env.py&quot;)
    File &quot;/opt/airflow/lib/python3.8/site-packages/alembic/util/pyfiles.py&quot;, line 97, in load_python_file
      module = load_module_py(module_id, path)
    File &quot;/opt/airflow/lib/python3.8/site-packages/alembic/util/compat.py&quot;, line 182, in load_module_py
      spec.loader.exec_module(module)
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 783, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/migrations/env.py&quot;, line 108, in &lt;module&gt;
      run_migrations_online()
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/migrations/env.py&quot;, line 102, in run_migrations_online
      context.run_migrations()
    File &quot;&lt;string&gt;&quot;, line 8, in run_migrations
    File &quot;/opt/airflow/lib/python3.8/site-packages/alembic/runtime/environment.py&quot;, line 813, in run_migrations
      self.get_context().run_migrations(**kw)
    File &quot;/opt/airflow/lib/python3.8/site-packages/alembic/runtime/migration.py&quot;, line 561, in run_migrations
      step.migration_fn(**kw)
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/migrations/versions/2c6edca13270_resource_based_permissions.py&quot;, line 314, in upgrade
      remap_permissions()
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/migrations/versions/2c6edca13270_resource_based_permissions.py&quot;, line 289, in remap_permissions
      appbuilder = create_app(config={'FAB_UPDATE_PERMS': False}).appbuilder
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/www/app.py&quot;, line 120, in create_app
      init_api_connexion(flask_app)
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/www/extensions/init_views.py&quot;, line 171, in init_api_connexion
      api_bp = connexion_app.add_api(
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/apps/flask_app.py&quot;, line 57, in add_api
      api = super(FlaskApp, self).add_api(specification, **kwargs)
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/apps/abstract.py&quot;, line 144, in add_api
      api = self.api_cls(specification,
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/apis/abstract.py&quot;, line 111, in __init__
      self.add_paths()
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/apis/abstract.py&quot;, line 216, in add_paths
      self._handle_add_operation_error(path, method, err.exc_info)
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/apis/abstract.py&quot;, line 231, in _handle_add_operation_error
      raise value.with_traceback(traceback)
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/resolver.py&quot;, line 61, in resolve_function_from_operation_id
      return self.function_resolver(operation_id)
    File &quot;/opt/airflow/lib/python3.8/site-packages/connexion/utils.py&quot;, line 111, in get_function_from_name
      module = importlib.import_module(module_name)
    File &quot;/usr/local/lib/python3.8/importlib/__init__.py&quot;, line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1014, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 991, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 975, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 671, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 783, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/api_connexion/endpoints/connection_endpoint.py&quot;, line 26, in &lt;module&gt;
      from airflow.api_connexion.schemas.connection_schema import (
    File &quot;/opt/airflow/lib/python3.8/site-packages/airflow/api_connexion/schemas/connection_schema.py&quot;, line 42, in &lt;module&gt;
      class ConnectionSchema(ConnectionCollectionItemSchema):  # pylint: disable=too-many-ancestors
    File &quot;/opt/airflow/lib/python3.8/site-packages/marshmallow/schema.py&quot;, line 121, in __new__
      klass._declared_fields = mcs.get_declared_fields(
    File &quot;/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py&quot;, line 94, in get_declared_fields
      fields.update(mcs.get_auto_fields(fields, converter, opts, dict_cls))
    File &quot;/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py&quot;, line 104, in get_auto_fields
      {
    File &quot;/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py&quot;, line 105, in &lt;dictcomp&gt;
      field_name: field.create_field(
    File &quot;/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py&quot;, line 28, in create_field
      return converter.field_for(model, column_name, **self.field_kwargs)
    File &quot;/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/convert.py&quot;, line 171, in field_for
      return self.property2field(prop, **kwargs)
    File &quot;/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/convert.py&quot;, line 146, in property2field
      field_class = field_class or self._get_field_class_for_property(prop)
    File &quot;/opt/airflow/lib/python3.8/site-packages/marshmallow_sqlalchemy/convert.py&quot;, line 210, in _get_field_class_for_property
      column = prop.columns[0]
    File &quot;/opt/airflow/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py&quot;, line 1220, in __getattr__
      return self._fallback_getattr(key)
    File &quot;/opt/airflow/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py&quot;, line 1194, in _fallback_getattr
      raise AttributeError(key)
  AttributeError: columns
  </code></pre>