Please help with Error Warning in MDN Web-Docs Django Tutorial Part 2

I am working on the MDN - Web docs tutorial:
Django Tutorial Part 2: Creating a skeleton website
What am I doing or not doing that I get the yellow warning sign like so

from django.contrib import admin
from django.urls import path
from django.urls import include
from django.views.generic import RedirectView

urlpatterns += [
    path('admin/', admin.site.urls),
    path('catalog/', include('catalog.urls')),
    path('', RedirectView.as_view(url='catalog/', permanent=True)),
]

from the terminal error log I am pointed to line 24 which is:

 path('catalog/', include('catalog.urls')),

Please post the complete traceback you are getting. We need to know what the full error message is that you are receiving.

[25/Aug/2024 11:44:26] "GET / HTTP/1.1" 200 12068
Not Found: /favicon.ico
[25/Aug/2024 11:44:26,599] - Broken pipe from ('127.0.0.1', 52573)

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py startapp catalog        

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

Exception in thread django-main-thread:
Traceback (most recent call last):
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\urls.py", 
line 136, in check_custom_error_handlers
    handler = resolver.resolve_error_handler(status_code)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 732, in resolve_error_handler
    callback = getattr(self.urlconf_module, "handler%s" % view_type, None)
                       ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\utils\functional.py", 
line 47, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 711, in urlconf_module
    return import_module(self.urlconf_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary\zacsLibrary\urls.py", line 24, in <module>  
    path('catalog/', include('catalog.urls')),
                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\conf.py", line 39, in include
    urlconf_module = import_module(urlconf_module)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'catalog.urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\utils\autoreload.py", 
line 64, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\commands\runserver.py", line 134, in inner_run
    self.check(display_num_errors=True)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\base.py", line 486, in check
    all_issues = checks.run_checks(
                 ^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\urls.py", 
line 138, in check_custom_error_handlers
    path = getattr(resolver.urlconf_module, "handler%s" % status_code)
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\utils\functional.py", 
line 47, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 711, in urlconf_module
    return import_module(self.urlconf_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary\zacsLibrary\urls.py", line 24, in <module>  
    path('catalog/', include('catalog.urls')),
                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\conf.py", line 39, in include
    urlconf_module = import_module(urlconf_module)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'catalog.urls'






If you are trying to run runserver immediately after the startapp command, you’re missing a whole bunch of steps from that tutorial. There are a whole sequence of things that you need to do before you can run runserver. The tutorial does not show you running runserver at that point.

Okay. Let e go back. Thank you

I have followed the tut up to where it says makemigrations. I press enter and voila I get the following traceback messages

Microsoft Windows [Version 10.0.19045.4780]
Microsoft Windows [Version 10.0.19045.4780]
(c) Microsoft Corporation. All rights reserved.
Microsoft Windows [Version 10.0.19045.4780]
(c) Microsoft Corporation. All rights reserved.

Microsoft Windows [Version 10.0.19045.4780]
(c) Microsoft Corporation. All rights reserved.

C:\Users\hp\Documents\Learn Python\Django\MDN05>venmdn05\scripts\activate        venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python man
Microsoft Windows [Version 10.0.19045.4780]
(c) Microsoft Corporation. All rights reserved.

C:\Users\hp\Documents\Learn Python\Django\MDN05>venmdn05\scripts\activate

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05>cd zacslibrary

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py runserver

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
Microsoft Windows [Version 10.0.19045.4780]
(c) Microsoft Corporation. All rights reserved.

C:\Users\hp\Documents\Learn Python\Django\MDN05>venmdn05\scripts\activate

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05>cd zacslibrary

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py runserver

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

(c) Microsoft Corporation. All rights reserved.

C:\Users\hp\Documents\Learn Python\Django\MDN05>venmdn05\scripts\activate

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05>cd zacslibrary

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py runserver

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
C:\Users\hp\Documents\Learn Python\Django\MDN05>venmdn05\scripts\activate

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05>cd zacslibrary

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py runserver

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05>cd zacslibrary

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py runserver

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py runserver

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
Performing system checks...

System check identified no issues (0 silenced).

System check identified no issues (0 silenced).

System check identified no issues (0 silenced).


You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
ions for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
August 25, 2024 - 11:44:22
Django version 5.1, using settings 'zacsLibrary.settings'
Run 'python manage.py migrate' to apply them.
August 25, 2024 - 11:44:22
Django version 5.1, using settings 'zacsLibrary.settings'
Starting development server at http://127.0.0.1:8000/
August 25, 2024 - 11:44:22
Django version 5.1, using settings 'zacsLibrary.settings'
Starting development server at http://127.0.0.1:8000/
Django version 5.1, using settings 'zacsLibrary.settings'
Starting development server at http://127.0.0.1:8000/
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.


[25/Aug/2024 11:44:26] "GET / HTTP/1.1" 200 12068
Not Found: /favicon.ico
[25/Aug/2024 11:44:26,599] - Broken pipe from ('127.0.0.1', 52573)

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py startapp catalog        

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

Exception in thread django-main-thread:
Traceback (most recent call last):
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\urls.py", 
line 136, in check_custom_error_handlers
    handler = resolver.resolve_error_handler(status_code)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 732, in resolve_error_handler
    callback = getattr(self.urlconf_module, "handler%s" % view_type, None)
                       ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\utils\functional.py", 
line 47, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 711, in urlconf_module
    return import_module(self.urlconf_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary\zacsLibrary\urls.py", line 24, in <module>  
    path('catalog/', include('catalog.urls')),
                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\conf.py", line 39, in include
    urlconf_module = import_module(urlconf_module)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'catalog.urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\utils\autoreload.py", 
line 64, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\commands\runserver.py", line 134, in inner_run
    self.check(display_num_errors=True)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\base.py", line 486, in check
    all_issues = checks.run_checks(
                 ^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\urls.py", 
line 138, in check_custom_error_handlers
    path = getattr(resolver.urlconf_module, "handler%s" % status_code)
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\utils\functional.py", 
line 47, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 711, in urlconf_module
    return import_module(self.urlconf_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary\zacsLibrary\urls.py", line 24, in <module>  
    path('catalog/', include('catalog.urls')),
                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\conf.py", line 39, in include
    urlconf_module = import_module(urlconf_module)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\importlib\__init__.py", line 90, in import_module

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py makemigrations
Traceback (most recent call last):
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 720, in url_patterns
    iter(patterns)
TypeError: 'module' object is not iterable

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

Traceback (most recent call last):
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary\manage.py", line 22, in <module>
    main()
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary\manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\__init__.py", line 436, in execute  
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\base.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\base.py", line 454, in execute      
    self.check()
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\base.py", line 486, in check
    all_issues = checks.run_checks(
                 ^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\urls.py", line 16, in check_url_config
    return check_resolver(resolver)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\urls.py", line 26, in check_resolver
    return check_method()

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py makemigrations
Traceback (most recent call last):
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 720, in url_patterns
    iter(patterns)
TypeError: 'module' object is not iterable

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

Traceback (most recent call last):
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary\manage.py", line 22, in <module>
    main()
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary\manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\base.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\base.py", line 454, in execute
    self.check()
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\base.py", line 486, in check
    all_issues = checks.run_checks(
                 ^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\urls.py", line 16, in check_url_config
    return check_resolver(resolver)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\urls.py", line 26, in check_resolver

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py makemigrations
Traceback (most recent call last):
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 720, in url_patterns
    iter(patterns)
TypeError: 'module' object is not iterable

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

Traceback (most recent call last):
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary\manage.py", line 22, in <module>
    main()
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary\manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line        
    utility.execute()
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\base.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\base.py", line 454, in execute
    self.check()
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\management\base.py", line 486, in check
    all_issues = checks.run_checks(
                 ^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\urls.py", line 16, in check_url_config
    return check_resolver(resolver)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\urls.py", line 26, in check_resolver
    return check_method()
           ^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 532, in check
    messages.extend(check_resolver(pattern))
                    ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\core\checks\urls.py", line 26, in check_resolver
    return check_method()
           ^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 531, in check
    for pattern in self.url_patterns:
                   ^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\utils\functional.py", line 47, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hp\Documents\Learn Python\Django\MDN05\venmdn05\Lib\site-packages\django\urls\resolvers.py", line 728, in url_patterns
    raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e
django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'catalog.urls' from 'C:\\Users\\hp\\Documents\\Learn Python\\Django\\MDN05\\zacsLibrary\\catalog\\urls.py'>' does not appear to have any patterns in it. If you see the 'urlpatterns' variable with valid patterns in the file then the issue is probably caused 
by a circular import.

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>

What does the tutorial tell you to do with the urls.py file before running makemigrations?

And what command does it tell you to run after makemigrations?

I should run migrate.

Correct. And you need to do the step before this one, where you create the urls.py file for the catalog app.

1 Like

@KenWhitesell thank you for your patience. In my limited view I think I have created the catalog/urls.py file. Where I think the problem is…is that I have to run makemigrations before I run migrate. The error/ traceback occurs when I run makemigrations. Thus I cannot run migrate. I am still trying to figure out where I am missing a step and what that missing step is.

Please post the complete contents of the catalog/urls.py file you have created.

Hi Ken. Thank you for your understanding. I checked over my code and I think maybe I did not save the catalog/urls.py file. I saved it and ran makemigrations. I got no changes detected. I ran migrate and got

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py migrate
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying auth.0012_alter_user_first_name_max_length... OK
  Applying sessions.0001_initial... OK

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>python manage.py migrate
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying auth.0012_alter_user_first_name_max_length... OK
  Applying sessions.0001_initial... OK

(venmdn05) C:\Users\hp\Documents\Learn Python\Django\MDN05\zacsLibrary>

Thank you.

1 Like