You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/10 13:38:29 UTC

[GitHub] [airflow] anirudhbagri opened a new issue #12247: Example DAGs import error

anirudhbagri opened a new issue #12247:
URL: https://github.com/apache/airflow/issues/12247


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**: 2.0.0b2
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**:
   - **OS** (e.g. from /etc/os-release):macOS
   - **Kernel** (e.g. `uname -a`):
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   Running `airflow db init` followed by `airflow dag list` give the following error:
   ```
   [2020-11-10 19:04:24,553] {dagbag.py:297} ERROR - Failed to import: /Users/abagri/Workspace/airflow2.0/venv/lib/python3.8/site-packages/airflow/example_dags/example_kubernetes_executor_config.py
   Traceback (most recent call last):
     File "/Users/abagri/Workspace/airflow2.0/venv/lib/python3.8/site-packages/airflow/models/dagbag.py", line 294, in _load_modules_from_file
       loader.exec_module(new_module)
     File "<frozen importlib._bootstrap_external>", line 783, in exec_module
     File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
     File "/Users/abagri/Workspace/airflow2.0/venv/lib/python3.8/site-packages/airflow/example_dags/example_kubernetes_executor_config.py", line 23, in <module>
       from kubernetes.client import models as k8s
   ModuleNotFoundError: No module named 'kubernetes'
   [2020-11-10 19:04:24,558] {dagbag.py:297} ERROR - Failed to import: /Users/abagri/Workspace/airflow2.0/venv/lib/python3.8/site-packages/airflow/example_dags/example_dag_decorator.py
   Traceback (most recent call last):
     File "/Users/abagri/Workspace/airflow2.0/venv/lib/python3.8/site-packages/airflow/models/dagbag.py", line 294, in _load_modules_from_file
       loader.exec_module(new_module)
     File "<frozen importlib._bootstrap_external>", line 783, in exec_module
     File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
     File "/Users/abagri/Workspace/airflow2.0/venv/lib/python3.8/site-packages/airflow/example_dags/example_dag_decorator.py", line 25, in <module>
       from airflow.providers.http.operators.http import SimpleHttpOperator
   ModuleNotFoundError: No module named 'airflow.providers'
   
   
   *****// Followed by name of other DAG, omiting here *******
   ```
   <!-- (please include exact error messages if you can) -->
   
   **What you expected to happen**:
   Expect the example dags to import files
   <!-- What do you think went wrong? -->
   
   **How to reproduce it**:
   1. Run `airflow db init`
   2. Run `airflow dag list`
   <!---
   
   As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.
   
   If you are using kubernetes, please attempt to recreate the issue using minikube or kind.
   
   ## Install minikube/kind
   
   - Minikube https://minikube.sigs.k8s.io/docs/start/
   - Kind https://kind.sigs.k8s.io/docs/user/quick-start/
   
   If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action
   
   You can include images using the .md style of
   ![alt text](http://url/to/img.png)
   
   To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.
   
   --->
   
   
   **Anything else we need to know**:
   
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] anirudhbagri commented on issue #12247: Example DAGs import error

Posted by GitBox <gi...@apache.org>.
anirudhbagri commented on issue #12247:
URL: https://github.com/apache/airflow/issues/12247#issuecomment-724763821


   You are right @turbaszek.
   Once I added `apache-airflow-providers-http` to requirements the error goes away.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] turbaszek closed issue #12247: Example DAGs import error

Posted by GitBox <gi...@apache.org>.
turbaszek closed issue #12247:
URL: https://github.com/apache/airflow/issues/12247


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] jbampton commented on issue #12247: Example DAGs import error

Posted by GitBox <gi...@apache.org>.
jbampton commented on issue #12247:
URL: https://github.com/apache/airflow/issues/12247#issuecomment-724712286


   Pretty sure it should be `airflow dags list`  not `airflow dag list`.   
   
   Worked for me on the latest master.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #12247: Example DAGs import error

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #12247:
URL: https://github.com/apache/airflow/issues/12247#issuecomment-724848250


   This is also part of #11435 - we have a few more core-> providers deps to remove. This is a great start :)


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] turbaszek commented on issue #12247: Example DAGs import error

Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #12247:
URL: https://github.com/apache/airflow/issues/12247#issuecomment-724761993


   @ashb @potiuk @dimberman I think the problem is that we are using providers and kubernetes code in core examples. The one with `SimpleHttpOperator` I know how to fix, but how do we want to approach k8s stuff? 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] anirudhbagri commented on issue #12247: Example DAGs import error

Posted by GitBox <gi...@apache.org>.
anirudhbagri commented on issue #12247:
URL: https://github.com/apache/airflow/issues/12247#issuecomment-724732638


   my bad. it is `airflow dags list`.
   But the error is still showing up.


----------------------------------------------------------------
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:
users@infra.apache.org