【问题标题】:Error: client = boto3.client('s3') | AWS Elastic Beanstalk Worker Environment错误:client = boto3.client('s3') | AWS Elastic Beanstalk 工作器环境
【发布时间】:2017-03-21 15:35:56
【问题描述】:

我正在开发 AWS Elastic Beanstalk Worker Environment。我有一个简单的应用程序,通过从 S3 存储桶下载并上传到另一个 S3 存储桶来处理图像。

当我更新代码时,/var/log/httpd/error_log

中出现错误

s3_client = boto3.client('s3')

SyntaxError: 无效语法

引发类型(self._exception),self._exception,self._traceback

请查找错误日志:

我的代码片段:

我在使用 boto 使用 AWS SES 时没有遇到任何错误

导入 boto.ses

【问题讨论】:

  • 你能展示更多你的代码吗?您的导入语句看起来不像是在导入 boto3。
  • 嗨@MarkB请找到上面附加的代码sn-p。我已经导入了 boto3 库。在 requirements.txt 文件中,我添加了 boto3 以确保其已安装。

标签: python-3.x amazon-web-services amazon-s3 amazon-elastic-beanstalk boto3


【解决方案1】:

我遇到了类似的问题。

我对这个问题没有很好的理解,但我能够通过将 futures 模块的版本固定到工作版本来解除阻塞。

例如,(在 requirements.txt 中)

futures==2.2.0

我从这里得到的信息: https://github.com/datastax/python-driver/pull/387

【讨论】:

    猜你喜欢
    • 2015-12-29
    • 2018-07-24
    • 2021-09-29
    • 2016-12-18
    • 1970-01-01
    • 2020-09-21
    • 2015-08-05
    • 2017-07-24
    • 2016-12-29
    相关资源
    最近更新 更多