Watching for file changes with StatReloader
Exception in the thread django -- the main thread:
Traceback (the most recent call last) :
The File "W: \ C \ lib \ threading py", line 916, in _bootstrap_inner
The self. The run ()
The File "W: \ C \ lib \ threading py", line 864, in the run
Self. _target (, * * * self. _args self. _kwargs)
File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ utils \ autoreload py", 53, line wrapper in
Fn (* args, * * kwargs)
File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django/core/management/commands \ runserver then executes py", line 110, in inner_run
Autoreload. Raise_last_exception ()
The File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ utils \ autoreload py", line 76, in raise_last_exception
Raise _exception [1]
File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django/core/management/set py", line 357, in the execute
Autoreload. Check_errors (django. Setup) ()
File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ utils \ autoreload py", 53, line wrapper in
Fn (* args, * * kwargs)
File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ set py", line 24, setup in
Apps. The populate (Settings. The INSTALLED_APPS)
The File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ apps \ registry py", line 114, in the populate
App_config. Import_models ()
The File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ apps \ config py", line 211, in import_models
Self. Models_module=import_module (models_module_name)
The File "W: \ \ lib \ importlib \ C set py", line 126, in import_module
Return _bootstrap. _gcd_import (name [level:], package, level)
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 994, in _gcd_import
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 971, in _find_and_load
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 955, in _find_and_load_unlocked
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 665, in _load_unlocked
The File "& lt; Frozen importlib. _bootstrap_external & gt;" , line 678, in exec_module
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 219, in _call_with_frames_removed
The File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ contrib \ auth \ models py", line 2, the in & lt; module>
The from the django. Contrib. Auth. Base_user import AbstractBaseUser, BaseUserManager
The File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ contrib \ auth \ base_user py", line 47, in & lt; module>
The class AbstractBaseUser (models. Model) :
The File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ db \ models \ base py", line 122, in __new__
New_class. Add_to_class (' _meta 'Options (meta, app_label))
The File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ db \ models \ base py", line 326, in add_to_class
Value. Contribute_to_class (CLS, name)
File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ db \ models \ options py", line 206, in contribute_to_class
Self. Db_table=truncate_name (self. Db_table, connection. Ops. Max_name_length ())
File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ db \ set py", 28, the line in __getattr__
Return getattr (connections [DEFAULT_DB_ALIAS], item)
The File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ db \ utils py", line 214, in the __getitem__
Backend=load_backend (db [' ENGINE '])
The File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ db \ utils py", line 111, in load_backend
S.b ase return import_module (' % '% backend_name)
The File "W: \ \ lib \ importlib \ C set py", line 126, in import_module
Return _bootstrap. _gcd_import (name [level:], package, level)
The File "C: \ Users \ 20822 \ AppData \ \ Roaming \ Python Python36 \ site - packages \ django \ db \ backends \ mysql \ base py", line 36, in & lt; module>
Raise ImproperlyConfigured (' mysqlclient 1.4.0 or newer is required; You have % s. % Database. The __version__)
Django. Core. Exceptions. ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; You have 0.9.3.
CodePudding user response:
Reason is that the Django versions is higher, need to use PIP upgrade mysqlclient version,The solution is to upgrade mysqlclient or lower version of django
CodePudding user response: