Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. Works locally but fails in Airflow: why?

Airflow & DAGs · Testing & Troubleshooting

Works locally but fails in Airflow: why?

Mediumairflow-33
troubleshootingdebugging

Question

Why might a task work locally but fail in Airflow?

Solution

Usual suspects:

  • Different Python version/environment
  • Missing package on the worker
  • Missing env vars / secrets
  • Local file paths that don't exist on workers
  • Permissions (S3/DB/API)
  • Wrong/missing Airflow Connections
  • Timezone differences
  • Network restrictions
  • Different working directory

Debug approach:

Read Airflow logs → Check env → Dependencies → Credentials → Paths → Reproduce in same environment
PreviousNext