【问题标题】:S3ResponseError: 100 Continue - python (appengine)S3ResponseError:100 继续 - python (appengine)
【发布时间】: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库的版本...

【问题讨论】:

标签: python google-app-engine amazon-web-services amazon-s3 boto


【解决方案1】:

又发生了……

boto版本是2.5.2

解决方法是注释该行:

headers['Expect'] = '100-Continue'

在 boto key.py 文件中

来源: https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fsminteractive%2Fboto%2Fcommit%2F59b0d6645db736138d87cf47a4c9e49d2a49e01e&sa=D&sntz=1&usg=AFQjCNEJb1UtdqOlhjmQ-NthWZplGOB7oA

【讨论】:

  • boto 2.38.0 也发生在我身上。他们不会发布修复此错误的 boto 吗?他们知道这个错误吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-01-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-06-20
  • 1970-01-01
相关资源
最近更新 更多