python manage.py runserver服务器跑不起来,早上还可以跑起来的

scout丶 发布于 2018/11/18 21:52
阅读 748
收藏 0
Performing system checks... Unhandled exception in thread started by .wrapper at 0x7f40b1fd69d8> Traceback (most recent call last): File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/urls/conf.py", line 17, in include urlconf_module, app_name = arg ValueError: too many values to unpack (expected 2) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/utils/autoreload.py", line 225, in wrapper fn(*args, **kwargs) File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 117, in inner_run self.check(display_num_errors=True) File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/core/management/base.py", line 379, in check include_deployment_checks=include_deployment_checks, File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/core/management/base.py", line 366, in _run_checks return checks.run_checks(**kwargs) File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/core/checks/registry.py", line 71, in run_checks new_errors = check(app_configs=app_configs) File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique all_namespaces = _load_all_namespaces(resolver) File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces url_patterns = getattr(resolver, 'url_patterns', []) File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/utils/functional.py", line 37, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/urls/resolvers.py", line 533, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/utils/functional.py", line 37, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/urls/resolvers.py", line 526, in urlconf_module return import_module(self.urlconf_name) File "/home/scout/.virtualenvs/test/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/home/scout/bj18/dailyfresh/dailyfresh/urls.py", line 20, in url(r'^admin/', include(admin.site.urls)), File "/home/scout/.virtualenvs/test/lib/python3.6/site-packages/django/urls/conf.py", line 27, in include 'provide the namespace argument to include() instead.' % len(arg) django.core.exceptions.ImproperlyConfigured: Passing a 3-tuple to include() is not supported. Pass a 2-tuple containing the list of patterns and app_name, and provide the namespace argument to include() instead.
加载中
0
scout丶
scout丶

大佬帮忙解决一下,虚拟环境中服务器跑不起来,不知道怎么回事,一直出错

0
wx---每日佳选
wx---每日佳选

应该是装的第三方包和django不兼容了.

0
007
007

在可以跑的地方运行 `pip freeze` 看下django版本号,让后在服务端上`pip install django==xxxx`  xxx 为刚才获取到的版本好 如 `pip install django==1.11.16`

返回顶部
顶部