VS代码在开始调试时显示“发生了异常:ModuleNotFoundError”

问题描述

我在Visual Studio Code上执行了“开始调试”,以调试Django网站。

但是,VS代码显示发生了异常:ModuleNotFoundError 没有名为“ maintenance_mode” ”的模块。

enter image description here

我已经使用“ pip3 install django-maintenance-mode ”安装了“ django-maintenance-mode ” v0.14.0。

我在WebServer / settings.py中的INSTALLED_APPS包含“ maintenance_mode ”(作为

INSTALLED_APPS = [
    'maintenance_mode',...
       ...
]

如果我从INSTALLED_APPS中删除了“ maintenance_mode”的用法,则调试模式有效。

但是我需要使用'maintenance_mode'模块。

我该怎么做才能使调试与“ maintenance_mode”模块一起工作?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)