在Google App Engine中出现“ImportError: 找不到名为smtpapi的模块”
我正在尝试在 Google App Engine 上使用 Python 设置 SendGrid,按照这里的说明进行操作:https://developers.google.com/appengine/docs/python/mail/sendgrid
我可以成功使用示例应用程序发送邮件:https://github.com/sendgrid/google-python-sample-app
但是这个示例是基于较旧的 SendGrid Python 代码,我想使用最新版本:https://github.com/sendgrid/sendgrid-python/tree/master/sendgrid
我尝试按照这里的指导进行操作:sendgrid google app engine python DistributionNotFound
...手动安装 SendGrid 和 smtpapi,然后把文件夹复制到我的 GAE 目录,再把 smtpapi 移动到 SendGrid 目录...
但是出现了错误:
"ImportError: cannot import name Sendgrid"
1 个回答
2
我觉得错误信息里可能有个线索,你是不是把Sendgrid(大写的S)写成了sendgrid(小写的)?