【发布时间】:2015-02-17 05:41:10
【问题描述】:
为了将文件上传到 AWS S3,我使用 boto python 库(在 appengine 中)已有几年了。 no new changes 对代码我在尝试更改 S3 上的文件时开始收到以下错误(在随机情况下)。错误发生后文件不会更新。
我的代码是:
if website_bucket is not None:
new_key = Key(website_bucket)
new_key.key = "live/"+page_domain+"/"+s3_name
new_key.set_metadata('original_filename', s3_name)
if s3_name == "sitemap.xml":
new_key.set_metadata('Content-Type', 'text/xml')
else:
new_key.set_metadata('Content-Type', 'text/html')
new_key.set_contents_from_string(page_html, policy='public-read')
return s3_name
错误是:
in file /boto/s3/key.py", line 684, in sender
S3ResponseError: S3ResponseError: 100 Continue
不知道boto库的版本...
【问题讨论】:
-
这可能是途中某处的通信错误 (s3/appengine/dns)。第二天错误就消失了。
标签: python google-app-engine amazon-web-services amazon-s3 boto