django - Python error: [Errno 99] Cannot assign requested address
问题描述
Internal Server Error: /api/users/Traceback (most recent call last): File '/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py', line 41, in inner response = get_response(request) File '/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py', line 187, in _get_response response = self.process_exception_by_middleware(e, request) File '/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py', line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File '/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py', line 58, in wrapped_view return view_func(*args, **kwargs) File '/usr/local/lib/python2.7/dist-packages/rest_framework/viewsets.py', line 86, in view return self.dispatch(request, *args, **kwargs) File '/usr/local/lib/python2.7/dist-packages/rest_framework/views.py', line 489, in dispatch response = self.handle_exception(exc) File '/usr/local/lib/python2.7/dist-packages/rest_framework/views.py', line 449, in handle_exception self.raise_uncaught_exception(exc) File '/usr/local/lib/python2.7/dist-packages/rest_framework/views.py', line 486, in dispatch response = handler(request, *args, **kwargs) File '/usr/local/lib/python2.7/dist-packages/misago/users/api/users.py', line 78, in create return create_endpoint(request) File '/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py', line 149, in _wrapped_view response = view_func(request, *args, **kwargs) File '/usr/local/lib/python2.7/dist-packages/misago/users/api/userendpoints/create.py', line 68, in create_endpoint mail_user(request, new_user, mail_subject, ’misago/emails/register/complete’) File '/usr/local/lib/python2.7/dist-packages/misago/core/mail.py', line 22, in mail_user message.send() File '/usr/local/lib/python2.7/dist-packages/django/core/mail/message.py', line 348, in send return self.get_connection(fail_silently).send_messages([self]) File '/usr/local/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py', line 104, in send_messages new_conn_created = self.open() File '/usr/local/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py', line 64, in open self.connection = self.connection_class(self.host, self.port, **connection_params) File '/usr/lib/python2.7/smtplib.py', line 256, in __init__ (code, msg) = self.connect(host, port) File '/usr/lib/python2.7/smtplib.py', line 316, in connect self.sock = self._get_socket(host, port, self.timeout) File '/usr/lib/python2.7/smtplib.py', line 291, in _get_socket return socket.create_connection((host, port), timeout) File '/usr/lib/python2.7/socket.py', line 575, in create_connection raise errerror: [Errno 99] Cannot assign requested address
google没有找到对应的问题啊,py新人求助~~
问题解答
回答1:你用来发邮件的 smtp 配置不对吧, 检查下 smtp 服务器配置
相关文章:
1. angular.js - ionic 弹窗样式2. vue.js - weex scroller搭配refresh在android平台上拉会触发refresh3. mysql - 大表和小表连接,应该注意什么,性能上4. javascript - h5上的手机号默认没有识别5. javascript - 在html中写了个<video>视频,浏览器却是一片空白为什么呢?360浏览器?6. javascript - 新建js文件时如何自动地加上"use strict"?7. 【加急】请问webarchive格式转换html怎么做8. css - div display: inline-block; 置中?9. css3 - Firefox 字号相对IE、Chrome更大,如何在CSS中统一?10. javascript - ajax中的 textStatus 报错为 parsererror?