小编pra*_*mar的帖子

airflow.exceptions.AirflowException:在 DAG 中检测到循环。错误的任务

我正在运行气流管道,但代码看起来不错,但实际上我得到了气流。异常。气流异常:在 DAG 中检测到循环。错误的任务:你能帮助解决这个问题吗

python-2.7 apache-airflow

7
推荐指数
2
解决办法
7487
查看次数

如何使用 Python 列出 S3 子目录中的文件

我正在尝试列出 S3 中子目录下的文件,但无法列出文件名:

import boto
from boto.s3.connection import S3Connection
access=''
secret=''
conn=S3Connection(access,secret)
bucket1=conn.get_bucket('bucket-name')
prefix='sub -directory -path'
print bucket1.list(prefix) 
files_list=bucket1.list(prefix,delimiter='/') 
print files_list
for files in files_list:
  print files.name
Run Code Online (Sandbox Code Playgroud)

你能帮我解决这个问题吗?

python amazon-s3 boto amazon-web-services

6
推荐指数
2
解决办法
2万
查看次数