airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Candler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-200) Hiding import errors / missing dependency on unicodecsv
Date Wed, 01 Jun 2016 14:38:59 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15310398#comment-15310398
] 

Brian Candler commented on AIRFLOW-200:
---------------------------------------

Sorry, what do you mean by a "PR"? (To me it means "Problem Report", which I thought this
was)

There is some slightly more detailed backtrace info in the mailing list posting:
http://mail-archives.apache.org/mod_mbox/incubator-airflow-dev/201605.mbox/%3Caf0ab045-19f9-2491-1270-e713a6578929%40pobox.com%3E

The newcomer experience is:

1 Airflow doesn't work out-of-the-box, even when following the quickstart guide
2. It gives a unhelpful exception report which does not tell you what the real problem is
3. You need to be prepared to debug the airflow code itself to get any further

> Hiding import errors / missing dependency on unicodecsv
> -------------------------------------------------------
>
>                 Key: AIRFLOW-200
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-200
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: core
>    Affects Versions: Airflow 1.7.1.2
>         Environment: ubuntu 14.04 (python 2.7), new virtualenv, pip install airflow
>            Reporter: Brian Candler
>            Priority: Minor
>              Labels: newbie
>
> When running the quickstart instructions at http://pythonhosted.org/airflow/start.html
inside a clean virtualenv:
> ERROR [airflow.models.DagBag] Failed to import:
> /home/brian/airflow/venv/local/lib/python2.7/site-packages/airflow/example_dags/example_twitter_dag.py
> Traceback (most recent call last):
>   File
> "/home/brian/airflow/venv/local/lib/python2.7/site-packages/airflow/models.py",
> line 247, in process_file
>     m = imp.load_source(mod_name, filepath)
>   File
> "/home/brian/airflow/venv/local/lib/python2.7/site-packages/airflow/example_dags/example_twitter_dag.py",
> line 26, in <module>
>     from airflow.operators import BashOperator, HiveOperator,
> PythonOperator
> ImportError: cannot import name HiveOperator
> Unfortunately that message doesn't help diagnose the problem, which is being hidden by
auto-import magic.
> It requires manually probing imports from the true source modules:
> >>> from airflow.operators.hive_operator import HiveOperator
> ...
> ImportError: cannot import name HiveCliHook
> >>> from airflow.hooks.hive_hooks import HiveCliHook
> ...
> ImportError: No module named unicodecsv
> Aha. "pip install unicodecsv" fixes the error.
> So I'd suggest two issues:
> 1. Add a packaging dependency on unicodecsv to fix this particular problem
> 2. Fix the auto-import magic so that it doesn't suppress these errors



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message