我遇到了一个问题,更新代码后无法使用uwgsi启动django项目。我可以用。我尝试django runserver来启动,实际上,这是工作。但就是不能使用uwgsi。
这是我的uwsgi配置。
[uwsgi]
chdir = /var/myblog
module = mysite.wsgi
home = /root/venv_myblog/
master = true
processes = 10
socket = 127.0.0.1:8001
vacuum = true
pidfile=uwsgi.pid
问题出在这里
urlconf_module = import_module(urlconf_module)
File "/root/venv_myblog/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
File "./webapp/urls.py", line 15, in <module>
ModuleNotFoundError: No module named 'webapp.views.opencv_tutorials'
但是我可以通过运行服务器运行它:
System check identified no issues (0 silenced).
February 01, 2019 - 08:44:19
Django version 2.1.4, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:9000/
Quit the server with CONTROL-C.
不知道为什么!!! 需要帮忙!!!!!!! 拜托!!!!