debug启动后报错 错误信息如图所示
来源:5-4 剩余app model注册
yu444913387
2018-07-23
"C:\Program Files\JetBrains\PyCharm 2018.1.1\bin\runnerw.exe" C:\Users\Administrator\Envs\py36\Scripts\python.exe "C:\Program Files\JetBrains\PyCharm 2018.1.1\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 58597 --file C:/Users/Administrator/PycharmProjects/mxonline/manage.py runserver 8000 pydev debugger: process 4500 is connecting Connected to pydev debugger (build 181.4445.76) pydev debugger: process 5624 is connecting Unhandled exception in thread started by <_pydev_bundle.pydev_monkey._NewThreadStartupWithTrace object at 0x0000000005387A90> Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2018.1.1\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 589, in __call__ return self.original_func(*self.args, **self.kwargs) File "C:\Users\Administrator\Envs\py36\lib\site-packages\django\utils\autoreload.py", line 227, in wrapper fn(*args, **kwargs) File "C:\Users\Administrator\Envs\py36\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run autoreload.raise_last_exception() File "C:\Users\Administrator\Envs\py36\lib\site-packages\django\utils\autoreload.py", line 250, in raise_last_exception six.reraise(*_exception) File "C:\Users\Administrator\Envs\py36\lib\site-packages\django\utils\six.py", line 685, in reraise raise value.with_traceback(tb) File "C:\Users\Administrator\Envs\py36\lib\site-packages\django\utils\autoreload.py", line 227, in wrapper fn(*args, **kwargs) File "C:\Users\Administrator\Envs\py36\lib\site-packages\django\__init__.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\Administrator\Envs\py36\lib\site-packages\django\apps\registry.py", line 85, in populate app_config = AppConfig.create(entry) File "C:\Users\Administrator\Envs\py36\lib\site-packages\django\apps\config.py", line 94, in create module = import_module(entry) File "C:\Users\Administrator\Envs\py36\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "C:\Users\Administrator\Envs\py36\lib\site-packages\django\contrib\admin\__init__.py", line 13, in <module> from django.contrib.admin.sites import AdminSite, site File "C:\Users\Administrator\Envs\py36\lib\site-packages\django\contrib\admin\sites.py", line 84 def register(self, model_or_iterable: object, admin_class: object = None, options: object) -> object: ^ SyntaxError: non-default argument follows default argument
写回答
2回答
-
yu444913387
提问者
2018-07-26
哦不对 这个问题是重装环境解决的 重装了就再没出现过
00 -
bobby
2018-07-25
你的django版本是多少? 你可以试一下重新安装django试试 这个报的python语法错误
032018-07-27
相似问题
配置数据库后,运行项目报错
回答 1
点击立即咨询后,去除错误信息
回答 3