环境是win10 + python 3.7,采用命令行运行,报错:
Unhandled exception in thread started by <function check_errors..wrapper at 0x0000026C4688EBF8>
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\autoreload.py", line 248, in raise_last_exception
raise exception[1]
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management_init.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django_init_.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\apps\registry.py", line 112, in populate
app_config.import_models()
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\apps\config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "C:\Users\mrcra\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\auth\models.py", line 94, in
class Group(models.Model):
File "C:\Users\mrcra\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\models\base.py", line 139, in new
new_class.add_to_class(obj_name, obj)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\models\base.py", line 305, in add_to_class
value.contribute_to_class(cls, name)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\models\fields\related.py", line 1583, in contribute_to_class
self.remote_field.through = create_many_to_many_intermediary_model(self, cls)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\models\fields\related.py", line 1051, in create_many_to_many_intermediary_model
'verbose_name': ('%(from)s-%(to)s relationship') % {'from': from, 'to': to},
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\functional.py", line 149, in mod
return str(self) % rhs
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\functional.py", line 113, in __text_cast
return func(*self.__args, **self._kw)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\translation_init.py", line 75, in gettext
return _trans.gettext(message)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\translation\trans_real.py", line 286, in gettext
_default = _default or translation(settings.LANGUAGE_CODE)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\translation\trans_real.py", line 199, in translation
_translations[language] = DjangoTranslation(language)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\translation\trans_real.py", line 102, in init
raise IOError("No translation files found for default language %s." % settings.LANGUAGE_CODE)
OSError: No translation files found for default language zh-ch.