Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMiguel Boekhold
7,217 PointsI'm getting a RuntimeError when I try to add a new record of a course
I received a raised exception when I try to add a course through django admin, is there anyone else who got similar issues?
My error:
RuntimeError at /admin/courses/course/add/
generator raised StopIteration
Request Method: POST
Request URL: http://localhost:8000/admin/courses/course/add/
Django Version: 1.8.1
Exception Type: RuntimeError
Exception Value:
generator raised StopIteration
Exception Location: C:\Users\migue\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\http\multipartparser.py in read, line 337
Python Executable: C:\Users\migue\AppData\Local\Programs\Python\Python37-32\python.exe
Python Version: 3.7.1
Python Path:
['C:\Users\migue\AppData\Local\Programs\Python\Python37-32\Scripts\learning_site',
'C:\Users\migue\AppData\Local\Programs\Python\Python37-32\python37.zip',
'C:\Users\migue\AppData\Local\Programs\Python\Python37-32\DLLs',
'C:\Users\migue\AppData\Local\Programs\Python\Python37-32\lib',
'C:\Users\migue\AppData\Local\Programs\Python\Python37-32',
'C:\Users\migue\AppData\Local\Programs\Python\Python37-32\lib\site-packages']
Server time: Tue, 20 Nov 2018 11:41:56 +0100
1 Answer
ursaminor
11,271 PointsThe error was raised at /admin/courses/course/add/ . It says "generator raised StopIteration Exception". Can you see where that might be happening in the code? If not, paste in the code from there.