运行django代码出现了这样的问题,求up解答,万分感谢!
Watching for file changes with StatReloader
Performing system checks...
Exception in thread django-main-thread:
Traceback (most recent call last):
File "D:\Python311\Lib\threading.py", line 1045, in _bootstrap_inner
self.run()
File "D:\Python311\Lib\threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "D:\Python311\Lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "D:\Python311\Lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run
self.check(display_num_errors=True)
File "D:\Python311\Lib\site-packages\django\core\management\base.py", line 392, in check
all_issues = self._run_checks(
^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\django\core\management\base.py", line 382, in _run_checks
return checks.run_checks(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\django\core\checks\registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\django\core\checks\urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\django\core\checks\urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\django\utils\functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\django\urls\resolvers.py", line 588, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\django\utils\functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\django\urls\resolvers.py", line 581, in urlconf_module
return import_module(self.urlconf_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "D:\工程\毕设\OnlineExamSystemBackend\OnlineExamSystem\urls.py", line 45, in <module>
path('docs/', include_docs_urls('Django在线考试系统接口文档')),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\rest_framework\documentation.py", line 61, in include_docs_urls
docs_view = get_docs_view(
^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\rest_framework\documentation.py", line 20, in get_docs_view
return get_schema_view(
^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\rest_framework\schemas\__init__.py", line 45, in get_schema_view
generator = generator_class(
^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\rest_framework\schemas\coreapi.py", line 120, in __init__
assert coreapi, '`coreapi` must be installed for schema support.'
AssertionError: `coreapi` must be installed for schema support.