执行python manage.py runserver时出错
enter code here
使用StatReloader监视文件更改
线程django-main-thread中的异常:
追溯(最近一次通话):
文件
“ c:\ users \ hp \ appdata \ local \ programs \ python \ python37 \ Lib \ threading.py”,
_bootstrap_inner中的第917行
self.run()
File "c:\users\hp\appdata\local\programs\python\python37\Lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django\utils\autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django\utils\autoreload.py", line 77, in raise_last_exception
raise _exception[1]
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django\core\management\__init__.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django\utils\autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django\apps\registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django\apps\config.py", line 90, in create
module = import_module(entry)
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\rest_framework_filters\__init__.py", line 3, in <module>
from .filterset import FilterSet
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\rest_framework_filters\filterset.py", line 10, in <module>
from django_filters import filterset, rest_framework
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django_filters\__init__.py", line 7, in <module>
from .filterset import FilterSet
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django_filters\filterset.py", line 15, in <module>
from .filters import (
File "C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django_filters\filters.py", line 10, in <module>
from django.db.models.sql.constants import QUERY_TERMS
ImportError: cannot import name 'QUERY_TERMS' from 'django.db.models.sql.constants' (C:\Users\HP\Desktop\iam_orm_layer\env\lib\site-packages\django\db\models\sql\constants.py)