'bolg.apps.BlogConfig'加上后runserver报错

来源:2-4 Django HelloWorld

好起来辣

2020-02-06 10:25

Traceback (most recent call last):

  File "D:\Python\anaconda\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper

    fn(*args, **kwargs)

  File "D:\Python\anaconda\lib\site-packages\django\core\management\commands\runserver.py", line 112, in inner_run

    autoreload.raise_last_exception()

  File "D:\Python\anaconda\lib\site-packages\django\utils\autoreload.py", line 248, in raise_last_exception

    raise _exception[1]

  File "D:\Python\anaconda\lib\site-packages\django\core\management\__init__.py", line 327, in execute

    autoreload.check_errors(django.setup)()

  File "D:\Python\anaconda\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper

    fn(*args, **kwargs)

  File "D:\Python\anaconda\lib\site-packages\django\__init__.py", line 24, in setup

    apps.populate(settings.INSTALLED_APPS)

  File "D:\Python\anaconda\lib\site-packages\django\apps\registry.py", line 89, in populate

    app_config = AppConfig.create(entry)

  File "D:\Python\anaconda\lib\site-packages\django\apps\config.py", line 116, in create

    mod = import_module(mod_path)

  File "D:\Python\Python37\Lib\importlib\__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import

  File "<frozen importlib._bootstrap>", line 983, in _find_and_load

  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import

  File "<frozen importlib._bootstrap>", line 983, in _find_and_load

  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'bolg'


写回答 关注

2回答

  • 好起来辣
    2020-02-07 15:00:52

    app建了

  • 风骤起
    2020-02-06 20:02:02

    blog app 确认正确创建了吗?
    No module named 'bolg'报的是没有这个app哦!

三小时带你入门Django框架 新版上架

Python开发上手Web框架的必备课程,三小时带你入门Django框架。

25806 学习 · 248 问题

查看课程

相似问题