Python 由<;启动的线程中存在未处理的异常;功能检查\u错误。<;本地人>;。0x10deb92f0处的包装>;

Python 由<;启动的线程中存在未处理的异常;功能检查\u错误。<;本地人>;。0x10deb92f0处的包装>;,python,django,Python,Django,使用python3 manage.py runserver命令运行django站点时出现问题。启动时,我发现以下错误: MacBook-Pro-Lev:mysite levpolomosnov$ python3 manage.py runserver Performing system checks... Unhandled exception in thread started by <function check_errors. <locals>.wrapper at

使用
python3 manage.py runserver
命令运行django站点时出现问题。启动时,我发现以下错误:

MacBook-Pro-Lev:mysite levpolomosnov$ python3 manage.py runserver
Performing system checks...

Unhandled exception in thread started by <function check_errors. 
<locals>.wrapper at 0x10deb92f0>
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/utils/autoreload.py", line 228, in wrapper
fn(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 124, in inner_run
self.check(display_num_errors=True)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/management/base.py", line 359, in check
include_deployment_checks=include_deployment_checks,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/management/base.py", line 346, in _run_checks
return checks.run_checks(**kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/checks/urls.py", line 16, in check_url_config
return check_resolver(resolver)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/urls/resolvers.py", line 256, in check
for pattern in self.url_patterns:
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/urls/resolvers.py", line 407, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/urls/resolvers.py", line 400, in urlconf_module
return import_module(self.urlconf_name)
  File "/Library/Frameworks/Python.framework/Versions/3.6/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 "/Users/levpolomosnov/Documents/mysite/mysite/urls.py", line 23, in <module>
from django.urls import include, path
ImportError: cannot import name 'include'
MacBook Pro Lev:mysite levpolomosnov$python3 manage.py运行服务器
正在执行系统检查。。。
由启动的线程中存在未处理的异常
回溯(最近一次呼叫最后一次):
包装器中的文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/utils/autoreload.py”,第228行
fn(*args,**kwargs)
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/core/management/commands/runserver.py”,第124行,在内部运行
self.check(display\u num\u errors=True)
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/core/management/base.py”,第359行,选中
包括部署检查=包括部署检查,
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/core/management/base.py”,第346行,在运行检查中
返回检查。运行检查(**kwargs)
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/core/checks/registry.py”,运行检查中的第81行
新建错误=检查(应用程序配置=应用程序配置)
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/core/checks/url.py”,第16行,在check\u url\u config中
返回检查\u分解器(分解器)
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/core/checks/url.py”,第26行,在check_解析器中
返回检查方法()
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/url/resolvers.py”,第256行,选中
对于self.url_模式中的模式:
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/utils/functional.py”,第35行,在__
res=instance.\uuuu dict\uuuu[self.name]=self.func(实例)
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/url/resolvers.py”,第407行,url_模式
patterns=getattr(self.urlconf_模块,“urlpatterns”,self.urlconf_模块)
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/utils/functional.py”,第35行,在__
res=instance.\uuuu dict\uuuu[self.name]=self.func(实例)
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site packages/django/url/resolvers.py”,第400行,在urlconf_模块中
返回导入_模块(self.urlconf_名称)
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/\uuuu init\uuuu.py”,第126行,在导入模块中
return _bootstrap._gcd_import(名称[级别:],包,级别)
文件“”,第978行,在_gcd_import中
文件“”,第961行,在“查找”和“加载”中
文件“”,第950行,在“查找”和“加载”中解锁
文件“”,第655行,已加载
exec_模块中第678行的文件“”
文件“”,第205行,在调用中删除了帧
文件“/Users/levpolomosnov/Documents/mysite/mysite/url.py”,第23行,在
从django.url导入包括,路径
ImportError:无法导入名称“include”

从django 2.0开始,
include
已移动到
django.url
。如果您使用的是较旧的django版本,那么它可能会抛出错误。请参阅有关此问题的说明。

您使用的是哪个版本的django?我使用的是django 2.1.4