错误-[Errno 11004] getaddrinfo从get_bucket方法失败?

时间:2019-11-14 21:40:45

标签: python amazon-s3

我在_socket.getaddrinfo(主机,端口,家庭,类型,原型,标志)中的res错误:socket.gaierror:[Errno 11004] getaddrinfo失败'在'conn.get_bucket'行中。虽然我从'conn.get_all_buckets()'行成功获取了存储桶列表。任何想法为什么我会收到此错误?

import boto3
from boto.s3.connection import S3Connection

accessKeyId = 'abc'
secretKey = 'xyz'
host = 'ecscloudstorage.asd.com'
port = 8080
signatureVersion = 's3'
accountType = 'S3 Compatible Storage'
bucketName ='testsomething'
# fileName = 'C:\\test1.txt'

conn = S3Connection(aws_access_key_id=accessKeyId,
            aws_secret_access_key=secretKey,
            host=host,
            port=port,
            is_secure=False)

print(conn.get_all_buckets())

my_bucket = conn.get_bucket(bucketName)
# print(my_bucket.name)

0 个答案:

没有答案