# Python Problem at Django Chapter 8 - Getting a single Object

**URL:** <https://forum.codewithmosh.com/t/python-problem-at-django-chapter-8-getting-a-single-object/15817>\
**Category:** Python\
**Created:** [October 11, 2022, 7:04pm UTC](https://forum.codewithmosh.com/t/python-problem-at-django-chapter-8-getting-a-single-object/15817 "2022-10-11T19:04:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharktank](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sharktank/32/4396_2.png) [@sharktank](https://forum.codewithmosh.com/u/sharktank)\
**Post date:** [October 11, 2022, 7:04pm UTC](https://forum.codewithmosh.com/t/python-problem-at-django-chapter-8-getting-a-single-object/15817/1 "2022-10-11T19:04:08Z")

</div>

So I’m at this part in the Python Django project where I put a int in the URL that’s connected to the database index number. The problem I have is that whenever I now try to load the webpage at the specified number (index) I keep getting this error(I’m doing books instead of movies btw):

 ![Screen Shot 2022-10-11 at 1.56.14 PM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/7/7db42849f85961b0a6a05e62a6f9365408e50931.jpeg)

I don’t know why the error is popping up. Based on the other images in VScode I should be doing everything right.

 ![Screen Shot 2022-10-11 at 1.58.19 PM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/7/70343f3511be61e078e6bcc95065118a3df00d1a.png)

![Screen Shot 2022-10-11 at 1.59.13 PM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/a/ad14491e5c78981d34d98bbf101925c13c0d3da6.png)

 ![Screen Shot 2022-10-11 at 1.59.26 PM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/f/fee5dd54157159ec6a819f67c0e8d931f8837896.png)

 ![Screen Shot 2022-10-11 at 1.59.34 PM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/5/52be96ab2765b3bfa9a819017e81ab18b376838a.png)

 ![Screen Shot 2022-10-11 at 1.59.42 PM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/b/b5115e19e1d6b4dfef17a3292d82f65b832a3165.png)

---

<div class="post-metadata">

**Author:** ![jmrunkle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/jmrunkle/32/3765_2.png) [@jmrunkle](https://forum.codewithmosh.com/u/jmrunkle)\
**Post date:** [October 12, 2022, 12:59am UTC](https://forum.codewithmosh.com/t/python-problem-at-django-chapter-8-getting-a-single-object/15817/2 "2022-10-12T00:59:37Z")

</div>

Since you went with books, is there any chance you named the index “books\_index” rather than “movies\_index”? I have not taken this course, but that seems like the kinda mistake I would make it I was changing themes.
