gpt4 book ai didi

boto3 - Airflow 中的 S3Hook : no attribute 'get_credentials'

转载 作者:行者123 更新时间:2023-12-02 00:32:34 25 4
gpt4 key购买 nike

我在 https://github.com/apache/incubator-airflow/blob/master/airflow/operators/s3_to_redshift_operator.py 使用 s3_to_reshift_operator执行时出现以下错误:

AttributeError: 'S3Hook' object has no attribute 'get_credentials'

看起来我的环境中使用的底层 S3Hook 与存储库中使用的不同。我该如何解决这个问题?我尝试升级 Airflow,但它没有解决我的问题。

最佳答案

好的,所以我认为您的问题是您使用的是 master 分支中的 s3_to_redshift 运算符(根据您的评论),它与 1.9 版本的 s3 Hook 不兼容。 s3 钩子(Hook)使用 aws 钩子(Hook)作为其基类,它不公开 1.9 中的 get_credentials 方法。它在 master 中。

关于boto3 - Airflow 中的 S3Hook : no attribute 'get_credentials' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51292260/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com