airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kengo Seki (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-2790) snakebite syntax error: baseTime = min(time * (1L << retries), cap);
Date Thu, 26 Jul 2018 01:20:00 GMT

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

Kengo Seki commented on AIRFLOW-2790:
-------------------------------------

Hi [~yohei],

One solution is replacing snakebite with another library, and that seems to be going on as
AIRFLOW-2697.
https://github.com/apache/incubator-airflow/pull/3560

I think you can backport the following PR to your environment as a workaround.
https://github.com/apache/incubator-airflow/pull/3365

> snakebite syntax error: baseTime = min(time * (1L << retries), cap);
> --------------------------------------------------------------------
>
>                 Key: AIRFLOW-2790
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2790
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: hooks
>    Affects Versions: 1.9.0
>         Environment: Amazon Linux
>            Reporter: Yohei Onishi
>            Priority: Major
>
> Does anybody know how can I fix this issue?
>  * Got the following error when importing airflow.operators.sensors.ExternalTaskSensor.
>  * apache-airflow 1.9.0 depends on snakebite 2.11.0 and it does not work with Python3. https://github.com/spotify/snakebite/issues/250
> [2018-07-23 06:42:51,828] \{models.py:288} ERROR - Failed to import: /home/airflow/airflow/dags/example_task_sensor2.py
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.6/site-packages/airflow/models.py", line 285, in process_file
>     m = imp.load_source(mod_name, filepath)
>   File "/usr/lib64/python3.6/imp.py", line 172, in load_source
>     module = _load(spec)
>   File "<frozen importlib._bootstrap>", line 675, in _load
>   File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
>   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
>   File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
>   File "/home/airflow/airflow/dags/example_task_sensor2.py", line 10, in <module>
>     from airflow.operators.sensors import ExternalTaskSensor
>   File "/usr/local/lib/python3.6/site-packages/airflow/operators/sensors.py", line 34,
in <module>
>     from airflow.hooks.hdfs_hook import HDFSHook
>   File "/usr/local/lib/python3.6/site-packages/airflow/hooks/hdfs_hook.py", line 20,
in <module>
>     from snakebite.client import Client, HAClient, Namenode, AutoConfigClient
>   File "/usr/local/lib/python3.6/site-packages/snakebite/client.py", line 1473
>     baseTime = min(time * (1L << retries), cap);
>                             ^



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message