【发布时间】:2019-12-03 10:55:51
【问题描述】:
我目前正在尝试运行此 AWS Lambda 入门教程:https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example-deployment-pkg.html#with-s3-example-deployment-pkg-python
但是,我总是收到错误消息:
{
"errorMessage": "Unable to import module 'CreateThumbnail': cannot import name '_imaging' from 'PIL' (/var/task/PIL/__init__.py)",
"errorType": "Runtime.ImportModuleError"
}
日志输出
START RequestId: fefba1d1-443c-4617-a5ad-c3aac19e5591 Version: $LATEST
[ERROR] Runtime.ImportModuleError: Unable to import module 'CreateThumbnail': cannot import name '_imaging' from 'PIL' (/var/task/PIL/__init__.py)
END RequestId: fefba1d1-443c-4617-a5ad-c3aac19e5591
REPORT RequestId: fefba1d1-443c-4617-a5ad-c3aac19e5591 Duration: 1.52 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 71 MB
我从lambci/docker-lambda 图像构建了我的.zip。但这并没有解决我的问题。
这是我的 .zip 文件中的内容。您有什么想法,为什么我仍然会收到此错误?
【问题讨论】:
-
你运气好吗?我面临同样的错误
-
@hax 请看下面我的回答。
标签: python amazon-web-services aws-lambda