<p dir="auto"><strong>Apache Airflow version</strong>:<br>
2.0.1</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>):<br>
none<br>
<strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
<li>ubuntu 20.04</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):<br>
Linux rafay-Inspiron-7537 5.8.0-48-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="89720033" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/54" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/54/hovercard" href="https://github.com/apache/airflow/pull/54">#54</a>~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[2021-04-06 10:58:25,430] {db.py:674} INFO - Creating tables
/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship 'DagRun.serialized_dag' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'TaskInstance.dag_run' (copies task_instance.dag_id to dag_run.dag_id), 'DagRun.task_instances' (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship 'SerializedDagModel.dag_runs' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'TaskInstance.dag_run' (copies task_instance.dag_id to dag_run.dag_id), 'DagRun.task_instances' (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
  File &quot;/usr/local/bin/airflow&quot;, line 8, in &lt;module&gt;
    sys.exit(main())
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/__main__.py&quot;, line 40, in main
    args.func(args)
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/cli/cli_parser.py&quot;, line 48, in command
    return func(*args, **kwargs)
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/cli/commands/db_command.py&quot;, line 31, in initdb
    db.initdb()
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/utils/db.py&quot;, line 549, in initdb
    upgradedb()
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/utils/db.py&quot;, line 684, in upgradedb
    command.upgrade(config, 'heads')
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/command.py&quot;, line 294, in upgrade
    script.run_env()
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/script/base.py&quot;, line 490, in run_env
    util.load_python_file(self.dir, &quot;env.py&quot;)
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/util/pyfiles.py&quot;, line 97, in load_python_file
    module = load_module_py(module_id, path)
  File &quot;/usr/local/lib/python3.7/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 728, in exec_module
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/migrations/env.py&quot;, line 108, in &lt;module&gt;
    run_migrations_online()
  File &quot;/usr/local/lib/python3.7/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;/usr/local/lib/python3.7/site-packages/alembic/runtime/environment.py&quot;, line 813, in run_migrations
    self.get_context().run_migrations(**kw)
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/runtime/migration.py&quot;, line 548, in run_migrations
    for step in self._migrations_fn(heads, self):
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/command.py&quot;, line 283, in upgrade
    return script._upgrade_revs(revision, rev)
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/script/base.py&quot;, line 365, in _upgrade_revs
    revs = list(revs)
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/script/revision.py&quot;, line 904, in _iterate_revisions
    requested_lowers = self.get_revisions(lower)
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/script/revision.py&quot;, line 455, in get_revisions
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/script/revision.py&quot;, line 455, in &lt;listcomp&gt;
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/script/revision.py&quot;, line 457, in get_revisions
    resolved_id, branch_label = self._resolve_revision_number(id_)
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/script/revision.py&quot;, line 640, in _resolve_revision_number
    self._revision_map
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/util/langhelpers.py&quot;, line 234, in __get__
    obj.__dict__[self.__name__] = result = self.fget(obj)
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/script/revision.py&quot;, line 156, in _revision_map
    for revision in self._generator():
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/script/base.py&quot;, line 115, in _load_revisions
    script = Script._from_filename(self, vers, file_)
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/script/base.py&quot;, line 904, in _from_filename
    module = util.load_python_file(dir_, filename)
  File &quot;/usr/local/lib/python3.7/site-packages/alembic/util/pyfiles.py&quot;, line 97, in load_python_file
    module = load_module_py(module_id, path)
  File &quot;/usr/local/lib/python3.7/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 728, in exec_module
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/migrations/versions/82b7c48c147f_remove_can_read_permission_on_config_.py&quot;, line 28, in &lt;module&gt;
    from airflow.www.app import create_app
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/www/app.py&quot;, line 38, in &lt;module&gt;
    from airflow.www.extensions.init_views import (
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/www/extensions/init_views.py&quot;, line 29, in &lt;module&gt;
    from airflow.www.views import lazy_add_provider_discovered_options_to_connection_form
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/www/views.py&quot;, line 96, in &lt;module&gt;
    from airflow.www import auth, utils as wwwutils
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/www/utils.py&quot;, line 27, in &lt;module&gt;
    from flask_appbuilder.models.sqla.interface import SQLAInterface
  File &quot;/usr/local/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py&quot;, line 16, in &lt;module&gt;
    from sqlalchemy_utils.types.uuid import UUIDType
  File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py&quot;, line 1, in &lt;module&gt;
    from .aggregates import aggregated  # noqa
  File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py&quot;, line 372, in &lt;module&gt;
    from .functions.orm import get_column_key
  File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py&quot;, line 1, in &lt;module&gt;
    from .database import (  # noqa
  File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py&quot;, line 11, in &lt;module&gt;
    from .orm import quote
  File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py&quot;, line 14, in &lt;module&gt;
    from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/query.py)
Traceback (most recent call last):
  File &quot;/usr/local/bin/airflow&quot;, line 8, in &lt;module&gt;
    sys.exit(main())
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/__main__.py&quot;, line 40, in main
    args.func(args)
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/cli/cli_parser.py&quot;, line 47, in command
    func = import_string(import_path)
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/utils/module_loading.py&quot;, line 32, in import_string
    module = import_module(module_path)
  File &quot;/usr/local/lib/python3.7/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 1006, in _gcd_import
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 967, in _find_and_load_unlocked
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 677, in _load_unlocked
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 728, in exec_module
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/cli/commands/user_command.py&quot;, line 29, in &lt;module&gt;
    from airflow.www.app import cached_app
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/www/app.py&quot;, line 38, in &lt;module&gt;
    from airflow.www.extensions.init_views import (
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/www/extensions/init_views.py&quot;, line 29, in &lt;module&gt;
    from airflow.www.views import lazy_add_provider_discovered_options_to_connection_form
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/www/views.py&quot;, line 96, in &lt;module&gt;
    from airflow.www import auth, utils as wwwutils
  File &quot;/usr/local/lib/python3.7/site-packages/airflow/www/utils.py&quot;, line 27, in &lt;module&gt;
    from flask_appbuilder.models.sqla.interface import SQLAInterface
  File &quot;/usr/local/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py&quot;, line 16, in &lt;module&gt;
    from sqlalchemy_utils.types.uuid import UUIDType
  File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py&quot;, line 1, in &lt;module&gt;
    from .aggregates import aggregated  # noqa
  File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py&quot;, line 372, in &lt;module&gt;
    from .functions.orm import get_column_key
  File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py&quot;, line 1, in &lt;module&gt;
    from .database import (  # noqa
  File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py&quot;, line 11, in &lt;module&gt;
    from .orm import quote
  File &quot;/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py&quot;, line 14, in &lt;module&gt;
    from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/query.py)
"><pre class="notranslate">[2021-04-06 10:58:25,430] {db.py:674} INFO - Creating tables
/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship <span class="pl-s"><span class="pl-pds">'</span>DagRun.serialized_dag<span class="pl-pds">'</span></span> will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): <span class="pl-s"><span class="pl-pds">'</span>TaskInstance.dag_run<span class="pl-pds">'</span></span> (copies task_instance.dag_id to dag_run.dag_id), <span class="pl-s"><span class="pl-pds">'</span>DagRun.task_instances<span class="pl-pds">'</span></span> (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider <span class="pl-k">if</span> these relationships should be linked with back_populates, or <span class="pl-k">if</span> viewonly=True should be applied to one or more <span class="pl-k">if</span> they are read-only. For the less common <span class="pl-k">case</span> that foreign key constraints are partially overlapping, the <span class="pl-en">orm.foreign</span>() annotation can be used to isolate the columns that should be written towards.   The <span class="pl-s"><span class="pl-pds">'</span>overlaps<span class="pl-pds">'</span></span> parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship <span class="pl-s"><span class="pl-pds">'</span>SerializedDagModel.dag_runs<span class="pl-pds">'</span></span> will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): <span class="pl-s"><span class="pl-pds">'</span>TaskInstance.dag_run<span class="pl-pds">'</span></span> (copies task_instance.dag_id to dag_run.dag_id), <span class="pl-s"><span class="pl-pds">'</span>DagRun.task_instances<span class="pl-pds">'</span></span> (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider <span class="pl-k">if</span> these relationships should be linked with back_populates, or <span class="pl-k">if</span> viewonly=True should be applied to one or more <span class="pl-k">if</span> they are read-only. For the less common <span class="pl-k">case</span> that foreign key constraints are partially overlapping, the <span class="pl-en">orm.foreign</span>() annotation can be used to isolate the columns that should be written towards.   The <span class="pl-s"><span class="pl-pds">'</span>overlaps<span class="pl-pds">'</span></span> parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/bin/airflow<span class="pl-pds">"</span></span>, line 8, <span class="pl-k">in</span> &lt;module&gt;
    sys.exit(main())
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/__main__.py<span class="pl-pds">"</span></span>, line 40, <span class="pl-k">in</span> main
    args.func(args)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/cli/cli_parser.py<span class="pl-pds">"</span></span>, line 48, <span class="pl-k">in</span> <span class="pl-c1">command</span>
    <span class="pl-k">return</span> func(<span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/cli/commands/db_command.py<span class="pl-pds">"</span></span>, line 31, <span class="pl-k">in</span> initdb
    <span class="pl-en">db.initdb</span>()
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/utils/db.py<span class="pl-pds">"</span></span>, line 549, <span class="pl-k">in</span> initdb
    <span class="pl-en">upgradedb</span>()
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/utils/db.py<span class="pl-pds">"</span></span>, line 684, <span class="pl-k">in</span> upgradedb
    command.upgrade(config, <span class="pl-s"><span class="pl-pds">'</span>heads<span class="pl-pds">'</span></span>)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/command.py<span class="pl-pds">"</span></span>, line 294, <span class="pl-k">in</span> upgrade
    <span class="pl-en">script.run_env</span>()
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/script/base.py<span class="pl-pds">"</span></span>, line 490, <span class="pl-k">in</span> run_env
    util.load_python_file(self.dir, <span class="pl-s"><span class="pl-pds">"</span>env.py<span class="pl-pds">"</span></span>)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/util/pyfiles.py<span class="pl-pds">"</span></span>, line 97, <span class="pl-k">in</span> load_python_file
    module = load_module_py(module_id, path)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/util/compat.py<span class="pl-pds">"</span></span>, line 182, <span class="pl-k">in</span> load_module_py
    spec.loader.exec_module(module)
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;frozen importlib._bootstrap_external&gt;<span class="pl-pds">"</span></span>, line 728, <span class="pl-k">in</span> exec_module
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;frozen importlib._bootstrap&gt;<span class="pl-pds">"</span></span>, line 219, <span class="pl-k">in</span> _call_with_frames_removed
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/migrations/env.py<span class="pl-pds">"</span></span>, line 108, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    <span class="pl-en">run_migrations_online</span>()
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/migrations/env.py<span class="pl-pds">"</span></span>, line 102, <span class="pl-k">in</span> run_migrations_online
    <span class="pl-en">context.run_migrations</span>()
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;string&gt;<span class="pl-pds">"</span></span>, line 8, <span class="pl-k">in</span> run_migrations
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/runtime/environment.py<span class="pl-pds">"</span></span>, line 813, <span class="pl-k">in</span> run_migrations
    <span class="pl-en">self.get_context</span>().run_migrations(<span class="pl-k">**</span>kw)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/runtime/migration.py<span class="pl-pds">"</span></span>, line 548, <span class="pl-k">in</span> run_migrations
    <span class="pl-k">for</span> <span class="pl-smi">step</span> <span class="pl-k">in</span> self._migrations_fn(heads, self):
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/command.py<span class="pl-pds">"</span></span>, line 283, <span class="pl-k">in</span> upgrade
    <span class="pl-k">return</span> script._upgrade_revs(revision, rev)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/script/base.py<span class="pl-pds">"</span></span>, line 365, <span class="pl-k">in</span> _upgrade_revs
    revs = list(revs)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/script/revision.py<span class="pl-pds">"</span></span>, line 904, <span class="pl-k">in</span> _iterate_revisions
    requested_lowers = self.get_revisions(lower)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/script/revision.py<span class="pl-pds">"</span></span>, line 455, <span class="pl-k">in</span> get_revisions
    <span class="pl-k">return</span> sum([self.get_revisions(id_elem) <span class="pl-k">for</span> <span class="pl-smi">id_elem</span> <span class="pl-k">in</span> <span class="pl-en">id_],</span> ())
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/script/revision.py<span class="pl-pds">"</span></span>, line 455, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>listcomp<span class="pl-k">&gt;</span>
    <span class="pl-k">return</span> sum([self.get_revisions(id_elem) <span class="pl-k">for</span> <span class="pl-smi">id_elem</span> <span class="pl-k">in</span> <span class="pl-en">id_],</span> ())
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/script/revision.py<span class="pl-pds">"</span></span>, line 457, <span class="pl-k">in</span> get_revisions
    resolved_id, branch_label = self._resolve_revision_number(id_)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/script/revision.py<span class="pl-pds">"</span></span>, line 640, <span class="pl-k">in</span> _resolve_revision_number
    self._revision_map
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/util/langhelpers.py<span class="pl-pds">"</span></span>, line 234, <span class="pl-k">in</span> __get__
    obj.__dict__[self.__name__] = result = self.fget(obj)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/script/revision.py<span class="pl-pds">"</span></span>, line 156, <span class="pl-k">in</span> _revision_map
    <span class="pl-k">for</span> <span class="pl-smi">revision</span> <span class="pl-k">in</span> <span class="pl-en">self._generator</span>():
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/script/base.py<span class="pl-pds">"</span></span>, line 115, <span class="pl-k">in</span> _load_revisions
    script = Script._from_filename(self, vers, file_)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/script/base.py<span class="pl-pds">"</span></span>, line 904, <span class="pl-k">in</span> _from_filename
    module = util.load_python_file(dir_, filename)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/util/pyfiles.py<span class="pl-pds">"</span></span>, line 97, <span class="pl-k">in</span> load_python_file
    module = load_module_py(module_id, path)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/alembic/util/compat.py<span class="pl-pds">"</span></span>, line 182, <span class="pl-k">in</span> load_module_py
    spec.loader.exec_module(module)
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;frozen importlib._bootstrap_external&gt;<span class="pl-pds">"</span></span>, line 728, <span class="pl-k">in</span> exec_module
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;frozen importlib._bootstrap&gt;<span class="pl-pds">"</span></span>, line 219, <span class="pl-k">in</span> _call_with_frames_removed
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/migrations/versions/82b7c48c147f_remove_can_read_permission_on_config_.py<span class="pl-pds">"</span></span>, line 28, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from airflow.www.app import create_app
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/www/app.py<span class="pl-pds">"</span></span>, line 38, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from airflow.www.extensions.init_views import (
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/www/extensions/init_views.py<span class="pl-pds">"</span></span>, line 29, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from airflow.www.views import lazy_add_provider_discovered_options_to_connection_form
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/www/views.py<span class="pl-pds">"</span></span>, line 96, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from airflow.www import auth, utils as wwwutils
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/www/utils.py<span class="pl-pds">"</span></span>, line 27, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from flask_appbuilder.models.sqla.interface import SQLAInterface
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py<span class="pl-pds">"</span></span>, line 16, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from sqlalchemy_utils.types.uuid import UUIDType
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py<span class="pl-pds">"</span></span>, line 1, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from .aggregates import aggregated  <span class="pl-c"><span class="pl-c">#</span> noqa</span>
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py<span class="pl-pds">"</span></span>, line 372, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from .functions.orm import get_column_key
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py<span class="pl-pds">"</span></span>, line 1, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from .database import (  <span class="pl-c"><span class="pl-c">#</span> noqa</span>
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py<span class="pl-pds">"</span></span>, line 11, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from .orm import quote
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py<span class="pl-pds">"</span></span>, line 14, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name <span class="pl-s"><span class="pl-pds">'</span>_ColumnEntity<span class="pl-pds">'</span></span> from <span class="pl-s"><span class="pl-pds">'</span>sqlalchemy.orm.query<span class="pl-pds">'</span></span> (/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/query.py)
Traceback (most recent call last):
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/bin/airflow<span class="pl-pds">"</span></span>, line 8, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    <span class="pl-en">sys.exit(main</span>())
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/__main__.py<span class="pl-pds">"</span></span>, line 40, <span class="pl-k">in</span> main
    args.func(args)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/cli/cli_parser.py<span class="pl-pds">"</span></span>, line 47, <span class="pl-k">in</span> <span class="pl-c1">command</span>
    func = import_string(import_path)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/utils/module_loading.py<span class="pl-pds">"</span></span>, line 32, <span class="pl-k">in</span> import_string
    module = import_module(module_path)
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/importlib/__init__.py<span class="pl-pds">"</span></span>, line 127, <span class="pl-k">in</span> import_module
    <span class="pl-k">return</span> _bootstrap._gcd_import(name[level:], package, level)
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;frozen importlib._bootstrap&gt;<span class="pl-pds">"</span></span>, line 1006, <span class="pl-k">in</span> _gcd_import
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;frozen importlib._bootstrap&gt;<span class="pl-pds">"</span></span>, line 983, <span class="pl-k">in</span> _find_and_load
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;frozen importlib._bootstrap&gt;<span class="pl-pds">"</span></span>, line 967, <span class="pl-k">in</span> _find_and_load_unlocked
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;frozen importlib._bootstrap&gt;<span class="pl-pds">"</span></span>, line 677, <span class="pl-k">in</span> _load_unlocked
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;frozen importlib._bootstrap_external&gt;<span class="pl-pds">"</span></span>, line 728, <span class="pl-k">in</span> exec_module
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;frozen importlib._bootstrap&gt;<span class="pl-pds">"</span></span>, line 219, <span class="pl-k">in</span> _call_with_frames_removed
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/cli/commands/user_command.py<span class="pl-pds">"</span></span>, line 29, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from airflow.www.app import cached_app
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/www/app.py<span class="pl-pds">"</span></span>, line 38, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from airflow.www.extensions.init_views import (
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/www/extensions/init_views.py<span class="pl-pds">"</span></span>, line 29, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from airflow.www.views import lazy_add_provider_discovered_options_to_connection_form
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/www/views.py<span class="pl-pds">"</span></span>, line 96, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from airflow.www import auth, utils as wwwutils
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/airflow/www/utils.py<span class="pl-pds">"</span></span>, line 27, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from flask_appbuilder.models.sqla.interface import SQLAInterface
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py<span class="pl-pds">"</span></span>, line 16, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from sqlalchemy_utils.types.uuid import UUIDType
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py<span class="pl-pds">"</span></span>, line 1, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from .aggregates import aggregated  <span class="pl-c"><span class="pl-c">#</span> noqa</span>
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py<span class="pl-pds">"</span></span>, line 372, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from .functions.orm import get_column_key
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py<span class="pl-pds">"</span></span>, line 1, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from .database import (  <span class="pl-c"><span class="pl-c">#</span> noqa</span>
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py<span class="pl-pds">"</span></span>, line 11, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from .orm import quote
  File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py<span class="pl-pds">"</span></span>, line 14, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name <span class="pl-s"><span class="pl-pds">'</span>_ColumnEntity<span class="pl-pds">'</span></span> from <span class="pl-s"><span class="pl-pds">'</span>sqlalchemy.orm.query<span class="pl-pds">'</span></span> (/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/query.py)
</pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
<code class="notranslate">airflow db init</code> should execute without a hitch</p>

<p dir="auto">Sqlalchemy package has been updated with some breaking changes. pip is installing <code class="notranslate">sqlalchemy-1.4.5</code>.</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/66644975/importerror-cannot-import-name-columnentity-from-sqlalchemy-orm-query" rel="nofollow">https://stackoverflow.com/questions/66644975/importerror-cannot-import-name-columnentity-from-sqlalchemy-orm-query</a></p>
<p dir="auto"><strong>How to reproduce it</strong>:</p>
<p dir="auto"><code class="notranslate">pip install apache-airflow[slack,statsd]</code></p>
<p dir="auto"><strong>Anything else we need to know</strong>:</p>
<p dir="auto"><strong>Apache Airflow version</strong>: 2.0.1</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>): N/A</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): Mac OS Big Sur</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>: pip 20.1.1</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">Our CI environment broke due to the release of SQLAlchemy 1.4, which is incompatible with the latest version of sqlalchemy-utils. (<a href="https://github.com/kvesteri/sqlalchemy-utils/issues/505" data-hovercard-type="issue" data-hovercard-url="/kvesteri/sqlalchemy-utils/issues/505/hovercard">Related issue</a>)</p>
<p dir="auto">Partial stacktrace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  File &quot;/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/airflow/www/utils.py&quot;, line 27, in &lt;module&gt;
    from flask_appbuilder.models.sqla.interface import SQLAInterface
  File &quot;/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py&quot;, line 16, in &lt;module&gt;
    from sqlalchemy_utils.types.uuid import UUIDType
  File &quot;/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py&quot;, line 1, in &lt;module&gt;
    from .aggregates import aggregated  # noqa
  File &quot;/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py&quot;, line 372, in &lt;module&gt;
    from .functions.orm import get_column_key
  File &quot;/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py&quot;, line 1, in &lt;module&gt;
    from .database import (  # noqa
  File &quot;/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py&quot;, line 11, in &lt;module&gt;
    from .orm import quote
  File &quot;/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py&quot;, line 14, in &lt;module&gt;
    from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py)"><pre class="notranslate"><code class="notranslate">  File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/airflow/www/utils.py", line 27, in &lt;module&gt;
    from flask_appbuilder.models.sqla.interface import SQLAInterface
  File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 16, in &lt;module&gt;
    from sqlalchemy_utils.types.uuid import UUIDType
  File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py", line 1, in &lt;module&gt;
    from .aggregates import aggregated  # noqa
  File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py", line 372, in &lt;module&gt;
    from .functions.orm import get_column_key
  File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py", line 1, in &lt;module&gt;
    from .database import (  # noqa
  File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py", line 11, in &lt;module&gt;
    from .orm import quote
  File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py", line 14, in &lt;module&gt;
    from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py)
</code></pre></div>
<p dir="auto">I'm not sure what the typical procedure is in the case of breaking changes to dependencies, but seeing as there's an upcoming release I thought it might be worth pinning sqlalchemy to 1.3.x? (Or pin the version of sqlalchemy-utils to a compatible version if one is released before Airflow 2.0.2)</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto"><code class="notranslate">airflow db init</code> to run successfully.</p>

<p dir="auto"><strong>How to reproduce it</strong>:</p>
<ol dir="auto">
<li>Create a new virtualenv</li>
<li><code class="notranslate">pip install apache-airflow</code></li>
<li><code class="notranslate">airflow db init</code></li>
</ol>