'NoneType'对象没有属性'rsplit'

时间:2017-11-29 01:48:58

标签: python django

我不确定如何追踪此错误:我正在AWS中运行Python 3.4上的django应用程序。

我在几个小时前重新部署,并在尝试使用环境变量修复错误时发现此错误。我不知道从哪里开始,或者我可能出错的地方。

它似乎与邮件有关,虽然我最近搞砸了一些邮件代码,但注释掉这些代码并没有解决问题或更改错误。

[Wed Nov 29 01:34:08.382512 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] Traceback (most recent call last):
[Wed Nov 29 01:34:08.382537 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/opt/python/run/venv/local/lib/python3.4/site-packages/django/core/handlers/exception.py", line 42, in inner
[Wed Nov 29 01:34:08.382541 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] response = get_response(request)
[Wed Nov 29 01:34:08.382559 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/opt/python/run/venv/local/lib/python3.4/site-packages/django/utils/deprecation.py", line 136, in __call__
[Wed Nov 29 01:34:08.382562 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] response = self.get_response(request)
[Wed Nov 29 01:34:08.382579 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/opt/python/run/venv/local/lib/python3.4/site-packages/django/core/handlers/exception.py", line 44, in inner
[Wed Nov 29 01:34:08.382582 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] response = response_for_exception(request, exc)
[Wed Nov 29 01:34:08.382599 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/opt/python/run/venv/local/lib/python3.4/site-packages/django/core/handlers/exception.py", line 94, in response_for_exception
[Wed Nov 29 01:34:08.382603 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
[Wed Nov 29 01:34:08.382620 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/opt/python/run/venv/local/lib/python3.4/site-packages/django/core/handlers/exception.py", line 132, in handle_uncaught_exception
[Wed Nov 29 01:34:08.382623 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] extra={'status_code': 500, 'request': request},
[Wed Nov 29 01:34:08.382639 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/usr/lib64/python3.4/logging/__init__.py", line 1303, in error
[Wed Nov 29 01:34:08.382642 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] self._log(ERROR, msg, args, **kwargs)
[Wed Nov 29 01:34:08.382657 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/usr/lib64/python3.4/logging/__init__.py", line 1409, in _log
[Wed Nov 29 01:34:08.382660 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] self.handle(record)
[Wed Nov 29 01:34:08.382675 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/usr/lib64/python3.4/logging/__init__.py", line 1419, in handle
[Wed Nov 29 01:34:08.382682 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] self.callHandlers(record)
[Wed Nov 29 01:34:08.382699 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/usr/lib64/python3.4/logging/__init__.py", line 1481, in callHandlers
[Wed Nov 29 01:34:08.382702 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] hdlr.handle(record)
[Wed Nov 29 01:34:08.382717 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
[Wed Nov 29 01:34:08.382720 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] self.emit(record)
[Wed Nov 29 01:34:08.382737 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/opt/python/run/venv/local/lib/python3.4/site-packages/django/utils/log.py", line 121, in emit
[Wed Nov 29 01:34:08.382740 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] self.send_mail(subject, message, fail_silently=True, html_message=html_message)
[Wed Nov 29 01:34:08.382756 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/opt/python/run/venv/local/lib/python3.4/site-packages/django/utils/log.py", line 124, in send_mail
[Wed Nov 29 01:34:08.382759 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] mail.mail_admins(subject, message, *args, connection=self.connection(), **kwargs)
[Wed Nov 29 01:34:08.382791 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/opt/python/run/venv/local/lib/python3.4/site-packages/django/utils/log.py", line 127, in connection
[Wed Nov 29 01:34:08.382795 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] return get_connection(backend=self.email_backend, fail_silently=True)
[Wed Nov 29 01:34:08.382811 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/opt/python/run/venv/local/lib/python3.4/site-packages/django/core/mail/__init__.py", line 36, in get_connection
[Wed Nov 29 01:34:08.382814 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] klass = import_string(backend or settings.EMAIL_BACKEND)
[Wed Nov 29 01:34:08.382830 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] File "/opt/python/run/venv/local/lib/python3.4/site-packages/django/utils/module_loading.py", line 15, in import_string
[Wed Nov 29 01:34:08.382833 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] module_path, class_name = dotted_path.rsplit('.', 1)
[Wed Nov 29 01:34:08.382845 2017] [:error] [pid 8768] [remote 172.31.5.39:46384] AttributeError: 'NoneType' object has no attribute 'rsplit'

0 个答案:

没有答案