[
https://issues.apache.org/jira/browse/AIRFLOW-6772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17161981#comment-17161981
]
Eugen Burlea commented on AIRFLOW-6772:
---------------------------------------
Run {{pip install 'apache-airflow[mysql]'}} that would install all the MySQL
dependencies that Airflow needs.
> {celery_executor.py:224} ERROR - Error sending Celery task:No module named
> 'MySQLdb'
> ------------------------------------------------------------------------------------
>
> Key: AIRFLOW-6772
> URL: https://issues.apache.org/jira/browse/AIRFLOW-6772
> Project: Apache Airflow
> Issue Type: Bug
> Components: celery, DAG
> Affects Versions: 1.10.7
> Environment: Ubuntu 18.04
> Reporter: Nitin Vashisth
> Priority: Critical
>
> I have installed airflow with python3.6 and airflow version as 1.10.7
> I did necessary changes in airflow.cfg as below
> {code:java}
> // celery_result_backend =
> db+postgresql://airflow:airflow@localhost/airflow{code}
> When I am trying to run a sample DAG (tutorial), it is throwing this error in
> my scheduler.
> {code:java}
> [2020-02-11 13:20:50,892] {celery_executor.py:224} ERROR - Error sending
> Celery task:No module named 'MySQLdb'
> Celery Task ID: ('tutorial', 'print_date', datetime.datetime(2020, 2, 10, 0,
> 0, tzinfo=<TimezoneInfo [UTC, GMT, +00:00:00, STD]>), 1)
> Traceback (most recent call last):
> File
> "/usr/local/lib/python3.6/dist-packages/airflow/executors/celery_executor.py",
> line 118, in send_task_to_executor
> result = task.apply_async(args=[command], queue=queue)
> File "/usr/local/lib/python3.6/dist-packages/celery/app/task.py", line 568,
> in apply_async
> **options
> File "/usr/local/lib/python3.6/dist-packages/celery/app/base.py", line 771,
> in send_task
> amqp.send_task_message(P, name, message, **options)
> File "/usr/local/lib/python3.6/dist-packages/celery/app/amqp.py", line 559,
> in send_task_message
> **properties
> File "/usr/local/lib/python3.6/dist-packages/kombu/messaging.py", line 181,
> in publish
> exchange_name, declare,
> File "/usr/local/lib/python3.6/dist-packages/kombu/connection.py", line
> 518, in _ensured
> return fun(*args, **kwargs)
> File "/usr/local/lib/python3.6/dist-packages/kombu/messaging.py", line 194,
> in _publish
> [maybe_declare(entity) for entity in declare]
> File "/usr/local/lib/python3.6/dist-packages/kombu/messaging.py", line 194,
> in <listcomp>
> [maybe_declare(entity) for entity in declare]
> File "/usr/local/lib/python3.6/dist-packages/kombu/messaging.py", line 102,
> in maybe_declare
> return maybe_declare(entity, self.channel, retry, **retry_policy)
> File "/usr/local/lib/python3.6/dist-packages/kombu/common.py", line 121, in
> maybe_declare
> return _maybe_declare(entity, channel)
> File "/usr/local/lib/python3.6/dist-packages/kombu/common.py", line 161, in
> _maybe_declare
> entity.declare(channel=channel)
> File "/usr/local/lib/python3.6/dist-packages/kombu/entity.py", line 609, in
> declare
> self._create_queue(nowait=nowait, channel=channel)
> File "/usr/local/lib/python3.6/dist-packages/kombu/entity.py", line 618, in
> _create_queue
> self.queue_declare(nowait=nowait, passive=False, channel=channel)
> File "/usr/local/lib/python3.6/dist-packages/kombu/entity.py", line 653, in
> queue_declare
> nowait=nowait,
> File
> "/usr/local/lib/python3.6/dist-packages/kombu/transport/virtual/base.py",
> line 531, in queue_declare
> self._new_queue(queue, **kwargs)
> File
> "/usr/local/lib/python3.6/dist-packages/kombu/transport/sqlalchemy/__init__.py",
> line 82, in _new_queue
> self._get_or_create(queue)
> File
> "/usr/local/lib/python3.6/dist-packages/kombu/transport/sqlalchemy/__init__.py",
> line 70, in _get_or_create
> obj = self.session.query(self.queue_cls) \
> File
> "/usr/local/lib/python3.6/dist-packages/kombu/transport/sqlalchemy/__init__.py",
> line 65, in session
> _, Session = self._open()
> File
> "/usr/local/lib/python3.6/dist-packages/kombu/transport/sqlalchemy/__init__.py",
> line 56, in _open
> engine = self._engine_from_config()
> File
> "/usr/local/lib/python3.6/dist-packages/kombu/transport/sqlalchemy/__init__.py",
> line 51, in _engine_from_config
> return create_engine(conninfo.hostname, **transport_options)
> File
> "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/__init__.py", line
> 479, in create_engine
> return strategy.create(*args, **kwargs)
> File
> "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/strategies.py",
> line 87, in create
> dbapi = dialect_cls.dbapi(**dbapi_args)
> File
> "/usr/local/lib/python3.6/dist-packages/sqlalchemy/dialects/mysql/mysqldb.py",
> line 118, in dbapi
> return __import__("MySQLdb")
> ModuleNotFoundError: No module named 'MySQLdb'
> {code}
> what could be the issue here
--
This message was sent by Atlassian Jira
(v8.3.4#803005)