啟動uwsgi報錯ImportError: No module named, unable to load app
啟動uwsgi報錯,提示找不到django的模組
報錯原因:
uwsgi的模板檔案書寫有誤。
解決方法:
更改啟動引數。
訪問
-
*** Operational MODE: preforking ***
-
added /newworld/lib/python3.5/site-packages/ to pythonpath.
-
added /mysite/mysite2/mysite2/ to pythonpath.
-
Traceback (most recent call last):
-
File "/mysite/mysite2/mysite2/wsgi.py", line 17, in <module>
-
application = get_wsgi_application()
-
File "/newworld/lib/python3.5/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
-
django.setup(set_prefix=False)
-
File "/newworld/lib/python3.5/site-packages/django/__init__.py", line 19, in setup
-
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
-
File "/newworld/lib/python3.5/site-packages/django/conf/__init__.py", line 56, in __getattr__
-
self._setup(name)
-
File "/newworld/lib/python3.5/site-packages/django/conf/__init__.py", line 43, in _setup
-
self._wrapped = Settings(settings_module)
-
File "/newworld/lib/python3.5/site-packages/django/conf/__init__.py", line 106, in __init__
-
mod = importlib.import_module(self.SETTINGS_MODULE)
-
File "/newworld/lib/python3.5/importlib/__init__.py", line 126, in import_module
-
return _bootstrap._gc_import(name[level:], package, level)
-
ImportError: No module named 'mysite2'
-
unable to load app 0 (mountpoint='') (callable not found or import error)
-
*** no app loaded. going in full dynamic mode ***
-
*** uWSGI is running in multiple interpreter mode ***
-
spawned uWSGI master process (pid: 83990)
-
spawned uWSGI worker 1 (pid: 83992, cores: 1)
- spawned uWSGI worker 2 (pid: 83993, cores: 1)
報錯原因:
uwsgi的模板檔案書寫有誤。
解決方法:
更改啟動引數。
-
(newworld) neo@ubuntu01:/mysite/mysite2$ uwsgi --socket 127.0.0.1:8001 --chdir /mysite/mysite2/ --wsgi-file mysite2/wsgi.py --master --processes 4 --threads 2 --stats 127.0.0.1:9191
-
*** Starting uWSGI 2.0.17 (64bit) on [Fri Jun 29 00:02:58 2018] ***
-
compiled with version: 5.4.0 20160609 on 28 June 2018 07:18:55
-
os: Linux-4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016
-
nodename: ubuntu01
-
machine: x86_64
-
clock source: unix
-
detected number of CPU cores: 1
-
current working directory: /mysite/mysite2
-
detected binary path: /usr/local/bin/uwsgi
-
!!! no internal routing support, rebuild with pcre support !!!
-
chdir() to /mysite/mysite2/
-
your processes number limit is 3750
-
your memory page size is 4096 bytes
-
detected max file descriptor number: 1024
-
lock engine: pthread robust mutexes
-
thunder lock: disabled (you can enable it with --thunder-lock)
-
uwsgi socket 0 bound to TCP address 127.0.0.1:8001 fd 3
-
Python version: 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609]
-
Python main interpreter initialized at 0x1228790
-
python threads support enabled
-
your server socket listen backlog is limited to 100 connections
-
your mercy for graceful operations on workers is 60 seconds
-
mapped 416720 bytes (406 KB) for 8 cores
-
*** Operational MODE: preforking+threaded ***
-
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x1228790 pid: 84595 (default app)
-
*** uWSGI is running in multiple interpreter mode ***
-
spawned uWSGI master process (pid: 84595)
-
spawned uWSGI worker 1 (pid: 84597, cores: 2)
-
spawned uWSGI worker 2 (pid: 84598, cores: 2)
-
spawned uWSGI worker 3 (pid: 84599, cores: 2)
-
spawned uWSGI worker 4 (pid: 84600, cores: 2)
- *** Stats server enabled on 127.0.0.1:9191 fd: 15 ***
訪問
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2157054/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ImportError: No module named torchvisionImportError
- ImportError: No module named `defusedxml`ImportErrorXML
- ImportError: No module named ‘torch‘ 解決方法ImportError
- pyecharts安裝後import錯誤 ImportError: No module named 'pyecharts_snapshot'EchartsImportError
- Linux:Python報錯:No module named MySQLdbLinuxPythonMySql
- sshd啟動報錯Could not load host key
- pycharm環境,命令列執行提示:ImportError: No module named xxx 解決方法PyCharm命令列ImportError
- 啟動IDEA 報 failed to load jvm dll XXX 錯誤IdeaAIJVM
- ImportError: No module named flask 導包失敗,Python3 重新安裝 Flask 模組ImportErrorFlaskPython
- 記錄安裝conda install Python庫時報No module named ‘tensorflow‘錯誤Python
- ModuleNotFoundError: No module named 'pyttsx'ErrorTTS
- Bug: No module named ‘pytest‘
- 關於python安裝dlib報錯“ ImportError: DLL load failed”的解決方法之一PythonImportErrorAI
- Vue啟動報錯 Cannot find module 'webpack/bin/config-yargs'VueWeb
- linux已經安裝bert4keras但出現ImportError: No module named ‘bert4keras‘LinuxKerasImportError
- swagger啟動錯誤Unable to infer base url.Swagger
- ModuleNotFoundError: No module named ‘Crypto‘ ‘Cryptodome‘Error
- pip成功安裝gdal的whl檔案後,PyCharm仍報錯No module named ‘osgeo’PyCharm
- spring配置檔案中配置了,但找不到Bean , 啟動不報錯,執行報錯No bean namedSpringBean
- 解決已安裝opencv但仍提示報錯“no module named cv2“問題OpenCV
- xcode simulator模擬器啟動報unable to bootXCodeboot
- ModuleNotFoundError: No module named 'phkit.pinyin'Error
- Latex編譯錯誤:Unable to load picture or PDF file 問題解決編譯
- AndroidStudio升級報錯Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve cAndroidAPPCompile
- pip install scrapy報錯:error: UnableError
- No module named MYSQLdb 問題解決MySql
- No Bean named 'Xxx' available 異常報錯BeanAI
- myeclipse啟動報錯Eclipse
- IDEA 報錯Failed to load JVM DLLIdeaAIJVM
- ModuleNotFoundError: No module named ‘DBUtils‘解決辦法Error
- Maven專案報錯:No bean named 'xxxxxx' availableMavenBeanAI
- eslint-plugin-import Unable to resolve path to moduleEsLintPluginImport
- 啟動idea時, 碰到"failed to load jvm DLL ..."錯誤 解決方案IdeaAIJVM
- pip報importError錯誤的一些情況ImportError
- Homestead 啟動 elasticsearch 報錯Elasticsearch
- 本地nacos啟動報錯
- 完美解決xhost +報錯: unable to open display
- 使用PyCharm時顯示的 No module named ‘xxx’PyCharm