运行python manage时候的报错信息

来源:17-6 如何同步本地代码到阿里云服务器

So_ne

2020-06-25

Watching for file changes with StatReloader
Exception in thread Thread-1:
Traceback (most recent call last):
File “/usr/local/lib/python3.7/threading.py”, line 917, in _bootstrap_inner
self.run()
File “/usr/local/lib/python3.7/threading.py”, line 865, in run
self._target(*self._args, **self._kwargs)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/utils/autoreload.py”, line 54, in wrapper
fn(*args, **kwargs)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/core/management/commands/runserver.py”, line 109, in inner_run
autoreload.raise_last_exception()
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/utils/autoreload.py”, line 77, in raise_last_exception
raise _exception0.with_traceback(_exception[2])
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/utils/autoreload.py”, line 54, in wrapper
fn(*args, **kwargs)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/init.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/apps/registry.py”, line 122, in populate
app_config.ready()
File “/root/MxOnline/xadmin/apps.py”, line 14, in ready
self.module.autodiscover()
File “/root/MxOnline/xadmin/init.py”, line 49, in autodiscover
register_builtin_plugins(site)
File “/root/MxOnline/xadmin/plugins/init.py”, line 43, in register_builtin_plugins
[import_module(‘xadmin.plugins.%s’ % plugin) for plugin in PLUGINS if plugin not in exclude_plugins]
File “/root/MxOnline/xadmin/plugins/init.py”, line 43, in
[import_module(‘xadmin.plugins.%s’ % plugin) for plugin in PLUGINS if plugin not in exclude_plugins]
File “/usr/local/lib/python3.7/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “

Traceback (most recent call last):
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/apps/registry.py”, line 155, in get_app_config
return self.app_configs[app_label]
KeyError: ‘users’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/contrib/auth/init.py”, line 165, in get_user_model
return django_apps.get_model(settings.AUTH_USER_MODEL, require_ready=False)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/apps/registry.py”, line 205, in get_model
app_config = self.get_app_config(app_label)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/apps/registry.py”, line 162, in get_app_config
raise LookupError(message)
LookupError: No installed app with label ‘users’.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “manage.py”, line 21, in
main()
File “manage.py”, line 17, in main
execute_from_command_line(sys.argv)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/core/management/init.py”, line 381, in execute_from_command_line
utility.execute()
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/core/management/init.py”, line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/core/management/base.py”, line 323, in run_from_argv
self.execute(*args, **cmd_options)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/core/management/commands/runserver.py”, line 60, in execute
super().execute(*args, **options)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/core/management/base.py”, line 364, in execute
output = self.handle(*args, **options)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/core/management/commands/runserver.py”, line 95, in handle
self.run(**options)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/core/management/commands/runserver.py”, line 102, in run
autoreload.run_with_reloader(self.inner_run, **options)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/utils/autoreload.py”, line 579, in run_with_reloader
start_django(reloader, main_func, *args, **kwargs)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/utils/autoreload.py”, line 564, in start_django
reloader.run(django_main_thread)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/utils/autoreload.py”, line 272, in run
get_resolver().urlconf_module
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/utils/functional.py”, line 80, in get
res = instance.dict[self.name] = self.func(instance)
File “/root/.virtualenvs/mxonline/lib/python3.7/site-packages/django/urls/resolvers.py”, line 564, in urlconf_module
return import_module(self.urlconf_name)
File “/usr/local/lib/python3.7/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “

写回答

4回答

bobby

2020-06-28

从这里看起来一共有两处错误: 1. 你截图我看看你的users这个app中的apps.py中name是如何配置的 以及你的settings中installed_apps中users是如何配置的 是不是保持了一直 比如你在app.py中name配置的是user但是installed_apps中配置的是users.xx.xxx导致不一致 2. 你这里还报了一个错是 _ssl 这个问题可以参考一下这个 https://blog.csdn.net/u011426236/article/details/88864469 

0
2
bobby
回复
So_ne
好的。
2020-07-01
共2条回复

So_ne

提问者

2020-06-29

# apps/users/apps.py设置

//img.mukewang.com/szimg/5ef93007093bd39a14890495.jpg

# settings.py设置

//img.mukewang.com/szimg/5ef930070940c4c114820593.jpg


0
0

So_ne

提问者

2020-06-28

完整的报错信息

//img.mukewang.com/szimg/5ef7f272098b50f309490250.jpg

//img1.sycdn.imooc.com/szimg/5ef7f27209f925ad09550647.jpg

//img1.sycdn.imooc.com/szimg/5ef7f272096e1dc409240790.jpg


0
0

bobby

2020-06-27

你把完整的错误截图我看看 这里没有看到关键信息

0
1
So_ne
报错信息截图已上传 bobby老师,这两天卡在这里了,这样问题感觉没有解决的思路。 只能把报错百度了一些报错信息,但是没找解决的答案
2020-06-28
共1条回复

Django+ xadmin 开发在线教育网站

一套通用的技术组合拳,助你解决大部分Python类网站后端问题

1911 学习 · 2149 问题

查看课程