を送るAppEngineのメールに反復可能ではないメールを送信しようとしたとき、私はこのエラーを取得する「NoneType」オブジェクトが私のローカルサーバ上
INFO 2017-03-01 16:54:06,819 mail_stub.py:143] MailService.Send
From: None "[email protected]"
To: v*****@d******.com
Subject: Du contenu arrive à expiration ([email protected])
Body:
Content-type: text/plain
Data length: 50
INFO 2017-03-01 16:54:06,819 mail_stub.py:306] You are not currently sending out real email. If you have sendmail installed you can use it by using the server with --enable_sendmailERROR 2017-03-01 16:48:43,630 wsgi.py:279] Traceback (most recent call last):
File "/home/*****/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 268, in Handle
for chunk in result:
TypeError: 'NoneType' object is not iterable
私のコードは次のとおりです。
def send(recipient, subject, body):
message = mail.EmailMessage(
sender=u'{} <[email protected]{}.appspotmail.com>'.format(app_identity.get_application_id(),
app_identity.get_application_id()),
subject=subject,
body=body,
to=recipient
)
message.check_initialized()
message.send()
そして私います何が間違っているのか分かりません。 Dあなたはこの問題や私がデバッグしようとすることができるいくつかの問題を解決するために何かを持っていますか?あなたのログには、あなたの助け
'send()'を呼び出すコードを表示できますか?エラーメッセージは 'mail_stub.py'の情報メッセージに続く*です。つまり、** send()が完了した後に実際に何か他のものによって引き起こされる可能性があります。この理論をチェックするために 'send()'の後にデバッグプリントを追加するかもしれませんか? –