JackyKwok42 opened a new issue #13268:
URL: https://github.com/apache/airflow/issues/13268
**Apache Airflow version**:
1.10.12
**Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
1.18
**Environment**:
- **Cloud provider or hardware configuration**: AWS Fargate
- **OS** (e.g. from /etc/os-release):
- **Kernel** (e.g. `uname -a`):
- **Install tools**: pip 20.2.4, python 3.8
- **Others**:
**What happened**:
I encountered an issue at the airflow initdb stage:
```
INFO [alembic.runtime.migration] Running upgrade 127d2bf2dfa7 ->
cc1e65623dc7, add max tries column to task instance
Traceback (most recent call last):
File "/usr/local/bin/airflow", line 37, in <module>
args.func(args)
File "/usr/local/lib/python3.8/site-packages/airflow/utils/cli.py", line
76, in wrapper
return f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/airflow/bin/cli.py", line
1382, in upgradedb
db.upgradedb()
File "/usr/local/lib/python3.8/site-packages/airflow/utils/db.py", line
386, in upgradedb
command.upgrade(config, 'heads')
File "/usr/local/lib/python3.8/site-packages/alembic/command.py", line
298, in upgrade
script.run_env()
File "/usr/local/lib/python3.8/site-packages/alembic/script/base.py", line
489, in run_env
util.load_python_file(self.dir, "env.py")
File "/usr/local/lib/python3.8/site-packages/alembic/util/pyfiles.py",
line 98, in load_python_file
module = load_module_py(module_id, path)
File "/usr/local/lib/python3.8/site-packages/alembic/util/compat.py", line
184, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed
File "/usr/local/lib/python3.8/site-packages/airflow/migrations/env.py",
line 97, in <module>
run_migrations_online()
File "/usr/local/lib/python3.8/site-packages/airflow/migrations/env.py",
line 91, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File
"/usr/local/lib/python3.8/site-packages/alembic/runtime/environment.py", line
846, in run_migrations
self.get_context().run_migrations(**kw)
File
"/usr/local/lib/python3.8/site-packages/alembic/runtime/migration.py", line
520, in run_migrations
step.migration_fn(**kw)
File
"/usr/local/lib/python3.8/site-packages/airflow/migrations/versions/cc1e65623dc7_add_max_tries_column_to_task_instance.py",
line 70, in upgrade
dagbag = DagBag(settings.DAGS_FOLDER)
File "/usr/local/lib/python3.8/site-packages/airflow/models/dagbag.py",
line 95, in __init__
executor = get_default_executor()
File
"/usr/local/lib/python3.8/site-packages/airflow/executors/__init__.py", line
48, in get_default_executor
DEFAULT_EXECUTOR = _get_executor(executor_name)
File
"/usr/local/lib/python3.8/site-packages/airflow/executors/__init__.py", line
85, in _get_executor
from airflow.executors.kubernetes_executor import KubernetesExecutor
File
"/usr/local/lib/python3.8/site-packages/airflow/executors/kubernetes_executor.py",
line 33, in <module>
from kubernetes import watch, client
ImportError: cannot import name 'watch' from 'kubernetes'
(/usr/local/lib/python3.8/site-packages/airflow/kubernetes/__init__.py)
```
**What you expected to happen**:
I expected the Airflow DB to be initialised as per the instructions.
**How to reproduce it**:
On a fresh installation, follow the Quick Start guide until the apache
initdb stage.
**Anything else we need to know**:
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]