Django runserver 报错 simple-history

python 3.8 django 3.2.7

  • 解决方案,将simple-history 将为 3.1.0
Traceback (most recent call last):
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\django\core\servers\basehttp.py", line 45, in get_internal_wsgi_application
    return import_string(app_path)
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\django\utils\module_loading.py", line 17, in import_string
    module = import_module(module_path)
  File "D:\environment\python3.8\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1014, in _gcd_import
  File "", line 991, in _find_and_load
  File "", line 975, in _find_and_load_unlocked
  File "", line 671, in _load_unlocked
  File "", line 783, in exec_module
  File "", line 219, in _call_with_frames_removed
  File "D:\mypro\workdir\ywxt\Ywxt\wsgi.py", line 16, in 
    application = get_wsgi_application()
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\django\core\wsgi.py", line 13, in get_wsgi_application
    return WSGIHandler()
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\django\core\handlers\wsgi.py", line 127, in __init__
    self.load_middleware()
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\django\core\handlers\base.py", line 40, in load_middleware
    middleware = import_string(middleware_path)
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\django\utils\module_loading.py", line 17, in import_string
    module = import_module(module_path)
  File "D:\environment\python3.8\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1014, in _gcd_import
  File "", line 991, in _find_and_load
  File "", line 975, in _find_and_load_unlocked
  File "", line 671, in _load_unlocked
  File "", line 783, in exec_module
  File "", line 219, in _call_with_frames_removed
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\simple_history\middleware.py", line 3, in 
    from asgiref.sync import iscoroutinefunction
ImportError: cannot import name 'iscoroutinefunction' from 'asgiref.sync' (D:\mypro\workdir\ywxt\venv\lib\site-packages\asgiref\sync.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\environment\python3.8\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "D:\environment\python3.8\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\django\core\management\commands\runserver.py", line 138, in inner_run
    handler = self.get_handler(*args, **options)
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\django\contrib\staticfiles\management\commands\runserver.py", line 27, in get_handler
    handler = super().get_handler(*args, **options)
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\django\core\management\commands\runserver.py", line 65, in get_handler
    return get_internal_wsgi_application()
  File "D:\mypro\workdir\ywxt\venv\lib\site-packages\django\core\servers\basehttp.py", line 47, in get_internal_wsgi_application
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: WSGI application 'Ywxt.wsgi.application' could not be loaded; Error importing module.

你可能感兴趣的:(django,sqlite,数据库)