Django中启动的时候报错,急求帮助,谢谢

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Django中启动的时候报错,急求帮助,谢谢相关的知识,希望对你有一定的参考价值。

Traceback (most recent call last):
File "/home/pyvip/.virtualenvs/MyBlog/lib/python3.6/site-packages/django/core/servers/basehttp.py", line 44, in get_internal_wsgi_application
return import_string(app_path)
File "/home/pyvip/.virtualenvs/MyBlog/lib/python3.6/site-packages/django/utils/module_loading.py", line 17, in import_string
module = import_module(module_path)
File "/home/pyvip/.virtualenvs/MyBlog/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
.........
ModuleNotFoundError: No module named 'django.contrib.session'

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

Traceback (most recent call last):
File "/home/pyvip/.pycharm_helpers/pydev/_pydev_bundle/pydev_monkey.py", line 589, in __call__
return self.original_func(*self.args, **self.kwargs)
File "/home/pyvip/.virtualenvs/MyBlog/lib/python3.6/site-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/home/pyvip/.virtualenvs/MyBlog/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 137, in inner_run
handler = self.get_handler(*args, **options)
File "/home/pyvip/.virtualenvs/MyBlog/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/runserver.py", line 27, in get_handler
handler = super().get_handler(*args, **options)
File "/home/pyvip/.virtualenvs/MyBlog/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 64, in get_handler
return get_internal_wsgi_application()
File "/home/pyvip/.virtualenvs/MyBlog/lib/python3.6/site-packages/django/core/servers/basehttp.py", line 49, in get_internal_wsgi_application
) from err
django.core.exceptions.ImproperlyConfigured: WSGI application 'MyBlog.wsgi.application' could not be loaded; Error importing module.

参考技术A

错误提示:没有找到'django.contrib.session'

你查看一下settings文件中,关于中间件的配置情况。

更多内容参考刘江的django教程

追问

中间件中存在session这个中间件

linux下安装rabbitmq报错

安装好rabbitmq后启动报错Error: unable to connect to node 'rabbit@instance-53pn50q9': nodedown哪位大神知道怎么解决

1.建议使用rpm包安装
2.相对来说比源码编译方便
3.你源码编译安装,自己没注意或者没加载库,报错了自己都不知道
4.希望可以帮助你,请采纳,谢谢
参考技术A 从你的日志可以看出来,机器上的rabbitmq server启动失败了,退出码是1,所以相应的端口也没有开起来,当使用cli去连接的时候,当然报错连接不上了,你需要看下rabbitmq server启动报错的详细日志,才好看怎么解决。 参考技术B

    你这图都看不清

    光凭这个报错,也没法着手解决啊

    其实你在这里问, 真的不一定能得到答案

    希望可以帮助你,请采纳,谢谢!

以上是关于Django中启动的时候报错,急求帮助,谢谢的主要内容,如果未能解决你的问题,请参考以下文章

django 2.2和mysql使用的常见问题

sql server 2008 无法链接,急求,谢谢各位大侠

启动Django项目报错

{Django基础八之cookie和session}一 会话跟踪 二 cookie 三 django中操作cookie 四 session 五 dja

配置Hadoop显示JAVA_HOME is not set。急求答案,谢谢!

无法进入ubuntu的grub引导,急求帮助!!!