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/08/19 00:57:41 UTC

[GitHub] [airflow] amirulmenjeni opened a new issue #10395: Invalid Syntax Error When Importing hdfs_hook

amirulmenjeni opened a new issue #10395:
URL: https://github.com/apache/airflow/issues/10395


   **Airflow Version**: 1.10.10
   
   **Issue**: When importing from `airflow.hooks.hdfs_hook` on Python 3.7.8. Here's the error message:
   
   ```
   Traceback (most recent call last):
     File "subdags/copy_subset.py", line 9, in <module>
       from airflow.hooks.hdfs_hook import HDFSHook
     File "/home/amirul.menjeni/.pyenv/versions/dataops-flow-env/lib/python3.7/site-packages/airflow/hooks/hdfs_hook.py", line 24, in <module>
       from snakebite.client import Client, HAClient, Namenode, AutoConfigClient
     File "/home/amirul.menjeni/.pyenv/versions/dataops-flow-env/lib/python3.7/site-packages/snakebite/client.py", line 1473
       baseTime = min(time * (1L << retries), cap);
                               ^
   SyntaxError: invalid syntax
   ```


----------------------------------------------------------------
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] ephraimbuddy commented on issue #10395: Invalid Syntax Error When Importing hdfs_hook

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


   @mik-laj, `snakebite-py3` is a fork of `snakebite` and is not maintained by Spotify. Do you suggest we should use it in place of `snakebite`?


----------------------------------------------------------------
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] amirulmenjeni commented on issue #10395: Invalid Syntax Error When Importing hdfs_hook

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


   Thanks, `pip install snakebite-py3` fixed this issue.


----------------------------------------------------------------
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] amirulmenjeni commented on issue #10395: Invalid Syntax Error When Importing hdfs_hook

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


   Relevant: https://github.com/spotify/snakebite/issues/216


----------------------------------------------------------------
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] ephraimbuddy commented on issue #10395: Invalid Syntax Error When Importing hdfs_hook

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


   You need to install snakebite-py3, snakebite does not work with python 3. I'll try and address this in 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] turbaszek closed issue #10395: Invalid Syntax Error When Importing hdfs_hook

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


   


----------------------------------------------------------------
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 #10395: Invalid Syntax Error When Importing hdfs_hook

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


   Closing as the issue seems to be solved and it seems that `snakebite-py3` is required for hdfs:
   https://github.com/apache/airflow/blob/12a652f5344c7f03c3d780556ca1829b235fdb2d/setup.py#L296-L298
   


----------------------------------------------------------------
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] boring-cyborg[bot] commented on issue #10395: Invalid Syntax Error When Importing hdfs_hook

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #10395:
URL: https://github.com/apache/airflow/issues/10395#issuecomment-675791136


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
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