项目启动时有报错,但是无法知道具体信息:
[root@Master new_project]# python3 manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/local/python3/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/local/python3/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/python3/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper fn(*args, **kwargs) File "/usr/local/python3/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 125, in inner_run autoreload.raise_last_exception() File "/usr/local/python3/lib/python3.8/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception raise _exception[1] File "/usr/local/python3/lib/python3.8/site-packages/django/core/management/__init__.py", line 394, in execute autoreload.check_errors(django.setup)() File "/usr/local/python3/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper fn(*args, **kwargs) File "/usr/local/python3/lib/python3.8/site-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/local/python3/lib/python3.8/site-packages/django/apps/registry.py", line 84, in populate raise RuntimeError("populate() isn't reentrant") RuntimeError: populate() isn't reentrant
解决方法,把最后一行的报错文件的对应行数里面的内容raise RuntimeError("populate() isn't reentrant")替换成self.app_configs = {},报错立显!
标签:python3.8,解决方案,py,Django,报错,usr,line,local,python3 From: https://www.cnblogs.com/lytcreate/p/17789886.html