当我 运行 运行modwsgi 时,为什么会出现缺少 'split' 属性的错误?
Why do I get the error that the 'split' attribute is missing when I run runmodwsgi?
我正在将 Django 页面移动到新服务器。由于 apache 服务器配置的复杂性,我使用 mod_wsgi-express 集成到 virtualenv python 中。根据此页面上的说明:https://pypi.org/project/mod-wsgi/#description,我将 mod_wsgi.server 添加到已安装的 Django 应用程序和 运行 命令 python manage.py runmodwsgi
。不幸的是,作为回应,我收到了一个粘贴在下面的错误。我将非常感谢任何帮助和解释为什么会出现此问题。
Traceback (most recent call last):
File "SAGI-B/manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/home/g####/.venvs/sa###/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/home/g####/.venvs/sa###/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/g####/.venvs/sa###/local/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/g####/.venvs/sa###/local/lib/python2.7/site-packages/django/core/management/base.py", line 345, in execute
output = self.handle(*args, **options)
File "/home/g####/.venvs/sa###/local/lib/python2.7/site-packages/mod_wsgi/server/management/commands/runmodwsgi.py", line 71, in handle
fields = wsgi_application.split('.')
AttributeError: 'NoneType' object has no attribute 'split'
我使用的 Django 版本是 1.10.7(我知道,我应该升级 - 我正在升级中)。在 settings.py 配置文件中,我没有找到带有 WSGI_APPLICATION = 'xyz.wsgi.application' 的行。这可能是错误的原因吗?
settings.py 文件中缺少带有 WSGI_APPLICATION = ...
的行是失败的原因。
我正在将 Django 页面移动到新服务器。由于 apache 服务器配置的复杂性,我使用 mod_wsgi-express 集成到 virtualenv python 中。根据此页面上的说明:https://pypi.org/project/mod-wsgi/#description,我将 mod_wsgi.server 添加到已安装的 Django 应用程序和 运行 命令 python manage.py runmodwsgi
。不幸的是,作为回应,我收到了一个粘贴在下面的错误。我将非常感谢任何帮助和解释为什么会出现此问题。
Traceback (most recent call last):
File "SAGI-B/manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/home/g####/.venvs/sa###/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/home/g####/.venvs/sa###/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/g####/.venvs/sa###/local/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/g####/.venvs/sa###/local/lib/python2.7/site-packages/django/core/management/base.py", line 345, in execute
output = self.handle(*args, **options)
File "/home/g####/.venvs/sa###/local/lib/python2.7/site-packages/mod_wsgi/server/management/commands/runmodwsgi.py", line 71, in handle
fields = wsgi_application.split('.')
AttributeError: 'NoneType' object has no attribute 'split'
我使用的 Django 版本是 1.10.7(我知道,我应该升级 - 我正在升级中)。在 settings.py 配置文件中,我没有找到带有 WSGI_APPLICATION = 'xyz.wsgi.application' 的行。这可能是错误的原因吗?
settings.py 文件中缺少带有 WSGI_APPLICATION = ...
的行是失败的原因。