# "py manage.py runserver" gives loads of errors

**URL:** <https://forum.djangoproject.com/t/py-manage-py-runserver-gives-loads-of-errors/35224>\
**Category:** Getting Started\
**Created:** [September 29, 2024, 4:43pm UTC](https://forum.djangoproject.com/t/py-manage-py-runserver-gives-loads-of-errors/35224 "2024-09-29T16:43:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nighttimedaydreamer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/nighttimedaydreamer/32/24227_2.png) [@nighttimedaydreamer](https://forum.djangoproject.com/u/nighttimedaydreamer)\
**Post date:** [September 29, 2024, 4:43pm UTC](https://forum.djangoproject.com/t/py-manage-py-runserver-gives-loads-of-errors/35224/1 "2024-09-29T16:43:41Z")

</div>

The errors suggest that it does not recognise django even though it is installed.

I ran “C:\Users(…)\project-name\mysite\>py manage.py runserver” using cmd prompt

I did “C:\Users(…)\project-name\mysite\>pip list” which gave:

Package Version

* * *

asgiref 3.8.1  
colorama 0.4.6  
Django 5.1.1  
pip 24.2  
pygame 2.5.2  
sqlparse 0.5.1  
tzdata 2024.2

no idea what that means tho

I did ensure that python and django were fully up to date

I used VS Code for a bit maybe that messed it up somehow??

I would really appreciate help because I’ve been stuck on this for 2 days

---

<div class="post-metadata">

**Author:** ![mkalioby](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/mkalioby/32/10488_2.png) [@mkalioby](https://forum.djangoproject.com/u/mkalioby)\
**Post date:** [September 29, 2024, 5:33pm UTC](https://forum.djangoproject.com/t/py-manage-py-runserver-gives-loads-of-errors/35224/2 "2024-09-29T17:33:05Z")

</div>

Please share screenshot of the error stacktrace

---

<div class="post-metadata">

**Author:** ![nighttimedaydreamer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/nighttimedaydreamer/32/24227_2.png) [@nighttimedaydreamer](https://forum.djangoproject.com/u/nighttimedaydreamer)\
**Post date:** [September 29, 2024, 5:36pm UTC](https://forum.djangoproject.com/t/py-manage-py-runserver-gives-loads-of-errors/35224/3 "2024-09-29T17:36:53Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/e/0/e0bf85c396a7ed9c6b2451195a7fed83d44c6781.png)

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [September 29, 2024, 5:45pm UTC](https://forum.djangoproject.com/t/py-manage-py-runserver-gives-loads-of-errors/35224/4 "2024-09-29T17:45:21Z")

</div>

Welcome @nighttimedaydreamer !

Please do **NOT** post images of errors or other textual information.

Copy/paste the text of the error into the body of your post as a code block.

Also, based upon what I can read of that image, post the contents of your mysite\urls.py file.

@mkalioby - Please do not encourage people to post screen shots. It’s requested that this type of information be posted as text.

---

<div class="post-metadata">

**Author:** ![nighttimedaydreamer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/nighttimedaydreamer/32/24227_2.png) [@nighttimedaydreamer](https://forum.djangoproject.com/u/nighttimedaydreamer)\
**Post date:** [September 29, 2024, 5:53pm UTC](https://forum.djangoproject.com/t/py-manage-py-runserver-gives-loads-of-errors/35224/5 "2024-09-29T17:53:11Z")

</div>

I replaced my name with (…) as I don’t want that to be quite so easy to find

```auto
Microsoft Windows [Version 10.0.22631.4169]
(c) Microsoft Corporation. All rights reserved.

C:\Users\(...)>cd C:\Users\anyat\Documents\project-name\mysite

C:\Users\(...)\Documents\project-name\mysite>py 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\(...)\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "C:\Users\(...)\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\(...)\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\(...)\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\management\commands\runserver.py", line 134, in inner_run
    self.check(display_num_errors=True)
  File "C:\Users\(...)\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\management\base.py", line 486, in check
    all_issues = checks.run_checks(
                 ^^^^^^^^^^^^^^^^^^
  File "C:\Users\(...)\AppData\Local\Programs\Python\Python312\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\(...)\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\checks\urls.py", line 44, in check_url_namespaces_unique
    all_namespaces = _load_all_namespaces(resolver)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\(...)\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\checks\urls.py", line 63, in _load_all_namespaces
    url_patterns = getattr(resolver, "url_patterns", [])
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\(...)\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\utils\functional.py", line 47, in __get__
    res = instance. __dict__ [self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\(...)\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\urls\resolvers.py", line 718, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
                       ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\(...)\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\utils\functional.py", line 47, in __get__
    res = instance. __dict__ [self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\(...)\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\urls\resolvers.py", line 711, in urlconf_module
    return import_module(self.urlconf_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\(...)\AppData\Local\Programs\Python\Python312\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\(...)\Documents\project-name\mysite\mysite\urls.py", line 21, in <module>
    path("polls/", include("polls.urls")),
                   ^^^^^^^
NameError: name 'include' is not defined

```

Just to clarify, my mysite\urls.py is from the tutorial, but here it is:

```auto
from django.contrib import admin
from django.urls import path

urlpatterns = [
    path("polls/", include("polls.urls")),
    path("admin/", admin.site.urls),
]

```

---

<div class="post-metadata">

**Author:** ![nighttimedaydreamer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/nighttimedaydreamer/32/24227_2.png) [@nighttimedaydreamer](https://forum.djangoproject.com/u/nighttimedaydreamer)\
**Post date:** [September 29, 2024, 5:54pm UTC](https://forum.djangoproject.com/t/py-manage-py-runserver-gives-loads-of-errors/35224/6 "2024-09-29T17:54:47Z")

</div>

also I’m not convinced i know what a stacktrace is

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [September 29, 2024, 6:09pm UTC](https://forum.djangoproject.com/t/py-manage-py-runserver-gives-loads-of-errors/35224/7 "2024-09-29T18:09:52Z")

</div>

> [@nighttimedaydreamer](#):
>
> `NameError: name 'include' is not defined`

Compare what you have in your urls.py file with what the tutorial is telling you you should have.

See [mysite/urls.py](https://docs.djangoproject.com/en/5.1/intro/tutorial01/#id3) and the block of text immediately above it.

---

<div class="post-metadata">

**Author:** ![nighttimedaydreamer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/nighttimedaydreamer/32/24227_2.png) [@nighttimedaydreamer](https://forum.djangoproject.com/u/nighttimedaydreamer)\
**Post date:** [September 29, 2024, 7:48pm UTC](https://forum.djangoproject.com/t/py-manage-py-runserver-gives-loads-of-errors/35224/8 "2024-09-29T19:48:04Z")

</div>

Thank you! And apologies for my incredible stupidity!

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [September 29, 2024, 8:30pm UTC](https://forum.djangoproject.com/t/py-manage-py-runserver-gives-loads-of-errors/35224/9 "2024-09-29T20:30:44Z")

</div>

No worries - no apologies necessary or warranted. It’s all part of the learning process.
