Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ImportError: No module named 'MySQLdb') celery executor issue #29

Open
Shrashti opened this issue Aug 9, 2018 · 2 comments
Open

(ImportError: No module named 'MySQLdb') celery executor issue #29

Shrashti opened this issue Aug 9, 2018 · 2 comments

Comments

@Shrashti
Copy link

Shrashti commented Aug 9, 2018

Hi,

I am facing below issue while running DAGS using airflow backfill <DAG_id> -s <start_date> -e <end_date>

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/airflow/executors/celery_executor.py", line 94, in sync
state = task.state
File "/usr/local/lib/python3.5/dist-packages/celery/result.py", line 431, in state
return self._get_task_meta()['status']
File "/usr/local/lib/python3.5/dist-packages/celery/result.py", line 370, in _get_task_meta
return self._maybe_set_cache(self.backend.get_task_meta(self.id))
File "/usr/local/lib/python3.5/dist-packages/celery/backends/base.py", line 352, in get_task_meta
meta = self._get_task_meta_for(task_id)
File "/usr/local/lib/python3.5/dist-packages/celery/backends/database/init.py", line 53, in _inner
return fun(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/celery/backends/database/init.py", line 122, in _get_task_meta_for
session = self.ResultSession()
File "/usr/local/lib/python3.5/dist-packages/celery/backends/database/init.py", line 99, in ResultSession
**self.engine_options)
File "/usr/local/lib/python3.5/dist-packages/celery/backends/database/session.py", line 58, in session_factory
engine, session = self.create_session(dburi, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/celery/backends/database/session.py", line 44, in create_session
engine = self.get_engine(dburi, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/celery/backends/database/session.py", line 41, in get_engine
return create_engine(dburi, poolclass=NullPool)
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/init.py", line 391, in create_engine
return strategy.create(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/strategies.py", line 80, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/dialects/mysql/mysqldb.py", line 110, in dbapi
return import('MySQLdb')
ImportError: No module named 'MySQLdb'

@celestialorb
Copy link

Same issue here. It feels like SqlAlchemy is defaulting to MySQL instead of Postgres.

@shao-shuai
Copy link

try pip install mysql-connector-python
and pip install mysql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants