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

Chapter 9 Import Error #72

Open
Chenyu-Tsai opened this issue Nov 16, 2022 · 0 comments
Open

Chapter 9 Import Error #72

Chenyu-Tsai opened this issue Nov 16, 2022 · 0 comments

Comments

@Chenyu-Tsai
Copy link

Hi,

I am trying to use the test_dag_integrity.py code on my own project.

Here is my directory structure:

root/

  • dags/
    • dag1.py
  • tests/
    • test_dag_integrity.py

In dag1.py, it imports several airflow operator like BigQueryOperator, SlackOperator, etc.

In test_dag_integrity.py, I modified the
DAG_PATH = os.path.join(os.path.dirname(__file__), "..", "..", "dags/**.py")
->
DAG_PATH = os.path.join(os.path.dirname(__file__), "..", "dags/**.py")
to meet my directory structure.

Then I run pytest test_dag_integrity.py, it failed and the summary info is like:
FAILED test_daily_pipeline_integration.py::test_dag_integrity[PATH\\TO\\MY\\DIRECTORY\\..\\dags\\ip_address_mapping.py] - ModuleNotFoundError: No module named 'airflow.providers.google'

Is there anything I missed?

Thanks !

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

1 participant