django-user-accountsをセットアップしました。パスワード リセット機能を使用して有効なメール アドレスを入力しようとすると、次のエラーが表示されます。
AnymailInvalidAddress at /account/password_reset/
Invalid email address format '': No email found
これは完全なトレースバックです:
Request Method: POST
Request URL: http://127.0.0.1:8000/account/password_reset/
Django Version: 1.10.5
Python Version: 3.5.2
Traceback:
File "C:\Anaconda3\lib\site-packages\anymail\utils.py" in __init__
120. raise ValueError('No email found')
During handling of the above exception (No email found), another exception
occurred:
File "C:\Anaconda3\lib\site-packages\django\core\handlers\exception.py" in inner
39. response = get_response(request)
File "C:\Anaconda3\lib\site-packages\django\core\handlers\base.py" in _legacy_get_response
249. response = self._get_response(request)
File "C:\Anaconda3\lib\site-packages\django\core\handlers\base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "C:\Anaconda3\lib\site-packages\django\core\handlers\base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Anaconda3\lib\site-packages\django\views\generic\base.py" in view
68. return self.dispatch(request, *args, **kwargs)
File "C:\Anaconda3\lib\site-packages\django\views\generic\base.py" in dispatch
88. return handler(request, *args, **kwargs)
File "C:\Anaconda3\lib\site-packages\django\views\generic\edit.py" in post
183. return self.form_valid(form)
File "C:\Anaconda3\lib\site-packages\account\views.py" in form_valid
582. self.send_email(form.cleaned_data["email"])
File "C:\Anaconda3\lib\site-packages\account\views.py" in send_email
608. hookset.send_password_reset_email([user.email], ctx)
File "C:\Anaconda3\lib\site-packages\account\hooks.py" in send_password_reset_email
33. send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, to)
File "C:\Anaconda3\lib\site-packages\django\core\mail\__init__.py" in send_mail
62. return mail.send()
File "C:\Anaconda3\lib\site-packages\django\core\mail\message.py" in send
342. return self.get_connection(fail_silently).send_messages([self])
File "C:\Anaconda3\lib\site-packages\anymail\backends\base.py" in send_messages
87. sent = self._send(message)
File "C:\Anaconda3\lib\site-packages\anymail\backends\base_requests.py" in _send
56. return super(AnymailRequestsBackend, self)._send(message)
File "C:\Anaconda3\lib\site-packages\anymail\backends\base.py" in _send
116. payload = self.build_message_payload(message, self.send_defaults)
File "C:\Anaconda3\lib\site-packages\anymail\backends\mailgun.py" in build_message_payload
28. return MailgunPayload(message, defaults, self)
File "C:\Anaconda3\lib\site-packages\anymail\backends\mailgun.py" in __init__
67. super(MailgunPayload, self).__init__(message, defaults, backend, auth=auth, *args, **kwargs)
File "C:\Anaconda3\lib\site-packages\anymail\backends\base_requests.py" in __init__
114. super(RequestsPayload, self).__init__(message, defaults, backend)
File "C:\Anaconda3\lib\site-packages\anymail\backends\base.py" in __init__
258. value = converter(value)
File "C:\Anaconda3\lib\site-packages\anymail\backends\base.py" in parsed_emails
282. for address in addresses]
File "C:\Anaconda3\lib\site-packages\anymail\backends\base.py" in <listcomp>
282. for address in addresses]
File "C:\Anaconda3\lib\site-packages\anymail\utils.py" in __init__
126. % (address, str(err)))
Exception Type: AnymailInvalidAddress at /account/password_reset/
Exception Value: Invalid email address format '': No email found
投稿リクエストには、有効な電子メールと CSRF トークンの両方が含まれています。Anymail は私のサイトの連絡先フォームで問題なく動作するので、Anymail は正しく設定されていると思います。
Django 1.10 と Python 3.5 を使用しています