Traceback (most recent call last):
File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 88, in
main()
File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 84, in main
execute_from_command_line(sys.argv)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management__init.py", line 401, in execute_from_command_line
utility.execute()
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management__init.py", line 345, in execute
settings.INSTALLED_APPS
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf__init.py", line 76, in getattr
self._setup(name)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf__init.py", line 63, in _setup
self._wrapped = Settings(settings_module)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf__init.py", line 142, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\importlib\init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\Users\uzmak\Documents\WordReview\WordReview\WordReview\init.py", line 2, in
if config.get('custom', 'db_type') == 'mysql':
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 1149, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'custom'
Traceback (most recent call last):
File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 88, in
main()
File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 84, in main
execute_from_command_line(sys.argv)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management\init__.py", line 401, in execute_from_command_line
utility.execute()
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management\init__.py", line 345, in execute
settings.INSTALLED_APPS
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf\init.py", line 76, in getattr__
self._setup(name)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf\init__.py", line 63, in _setup
self._wrapped = Settings(settings_module)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf\init.py", line 142, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\importlib\init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\Users\uzmak\Documents\WordReview\WordReview\WordReview\init__.py", line 2, in
if config.get('custom', 'db_type') == 'mysql':
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 1149, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'custom'
如果直接执行
python manage.py runserver
则出现以下报错:
Traceback (most recent call last):
File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 88, in
main()
File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 84, in main
execute_from_command_line(sys.argv)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management__init.py", line 401, in execute_from_command_line
utility.execute()
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management__init.py", line 345, in execute
settings.INSTALLED_APPS
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf__init.py", line 76, in getattr__
self._setup(name)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf\init__.py", line 63, in _setup
self._wrapped = Settings(settings_module)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf\init.py", line 142, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\importlib\init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\Users\uzmak\Documents\WordReview\WordReview\WordReview\init__.py", line 2, in
if config.get('custom', 'db_type') == 'mysql':
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 1149, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'custom'
描述问题 我在按照详细安装指引进行安装时,进行到第四步(前戏),在执行
时,遇到报错
configparser.NoSectionError: No section: 'custom'
.同时,执行时,也发生类似报错,且并没有弹出localhost的网页。详细报错信息、配置环境等附后。 复现问题 复现问题的步骤:
packages in environment at C:\Users\uzmak.conda\envs\wordsReviewEnv:
#
Name Version Build Channel
asgiref 3.3.4 pypi_0 pypi beautifulsoup4 4.9.3 pypi_0 pypi bs4 0.0.1 pypi_0 pypi ca-certificates 2021.4.13 haa95532_1 certifi 2020.12.5 py39haa95532_0 chardet 4.0.0 pypi_0 pypi django 3.0.7 pypi_0 pypi django-appconf 1.0.4 pypi_0 pypi django-compressor 2.4.1 pypi_0 pypi django-mysql 3.3.0 pypi_0 pypi django-sass-processor 0.8 pypi_0 pypi idna 2.10 pypi_0 pypi libsass 0.19.4 pypi_0 pypi lxml 4.6.3 pypi_0 pypi mysqlclient 1.4.6 pypi_0 pypi numpy 1.20.2 pypi_0 pypi openssl 1.1.1k h2bbff1b_0 pandas 1.2.4 pypi_0 pypi pip 21.0.1 py39haa95532_0 pymysql 0.9.3 pypi_0 pypi pypugjs 5.8.1 pypi_0 pypi python 3.9.4 h6244533_0 python-dateutil 2.8.1 pypi_0 pypi pytz 2021.1 pypi_0 pypi rcssmin 1.0.6 pypi_0 pypi requests 2.25.1 pypi_0 pypi rjsmin 1.1.0 pypi_0 pypi setuptools 52.0.0 py39haa95532_0 soupsieve 2.2.1 pypi_0 pypi sqlite 3.35.4 h2bbff1b_0 sqlparse 0.4.1 pypi_0 pypi tzdata 2020f h52ac0ba_0 urllib3 1.26.4 pypi_0 pypi vc 14.2 h21ff451_1 vs2015_runtime 14.27.29016 h5e58377_2 wheel 0.36.2 pyhd3eb1b0_0 wincertstore 0.2 py39h2bbff1b_0 xlrd 2.0.1 pypi_0 pypi
python manage.py makemigrations python manage.py migrate
Traceback (most recent call last): File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 88, in
main()
File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 84, in main
execute_from_command_line(sys.argv)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management__init.py", line 401, in execute_from_command_line
utility.execute()
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management__init.py", line 345, in execute
settings.INSTALLED_APPS
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf__init.py", line 76, in getattr
self._setup(name)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf__init.py", line 63, in _setup
self._wrapped = Settings(settings_module)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf__init.py", line 142, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\importlib\init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\Users\uzmak\Documents\WordReview\WordReview\WordReview\ init.py", line 2, in
if config.get('custom', 'db_type') == 'mysql':
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 1149, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'custom'
Traceback (most recent call last):
File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 88, in
main()
File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 84, in main
execute_from_command_line(sys.argv)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management\ init__.py", line 401, in execute_from_command_line
utility.execute()
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management\init__.py", line 345, in execute
settings.INSTALLED_APPS
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf\init.py", line 76, in getattr__
self._setup(name)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf\init__.py", line 63, in _setup
self._wrapped = Settings(settings_module)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf\init.py", line 142, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\importlib\init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\Users\uzmak\Documents\WordReview\WordReview\WordReview\ init__.py", line 2, in
if config.get('custom', 'db_type') == 'mysql':
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 1149, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'custom'
python manage.py runserver
Traceback (most recent call last): File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 88, in
main()
File "C:\Users\uzmak\Documents\WordReview\WordReview\manage.py", line 84, in main
execute_from_command_line(sys.argv)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management__init.py", line 401, in execute_from_command_line
utility.execute()
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\core\management__init.py", line 345, in execute
settings.INSTALLED_APPS
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf__init.py", line 76, in getattr__
self._setup(name)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf\init__.py", line 63, in _setup
self._wrapped = Settings(settings_module)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\site-packages\django\conf\init.py", line 142, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\importlib\init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\Users\uzmak\Documents\WordReview\WordReview\WordReview\ init__.py", line 2, in
if config.get('custom', 'db_type') == 'mysql':
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "C:\Users\uzmak.conda\envs\wordsReviewEnv\lib\configparser.py", line 1149, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'custom'