Alright I don't usually resort to this because I usually find the problem but for the life of me I can't figure this one out I keep getting 500 internal server error and I can't figure out what the problem is. I have copy and pasted all of his code to make sure that everything was what it was supposed to be and I still get the same error whether it's his code or my code. There is a comment on that video, which someone was getting the same error https://www.youtube.com/watch?list=PLQVvvaa0QuDc_owjTbIY4rbgXOFkUYOUB&v=FmfpMLoRjWU and when I remove this line of code the page works however I dont have my header now.:
{% extends "header.html" %}
sentdex replied saying this To find the error to a 500 error, first, try to run, via the shell, python _init_.py. See if you get an error there. If not, then in the function itself, encase it in a try/except Exception as e: return str(e)
I'm not quite sure how I would go about doing that. The code for that file is as follows
You must be logged in to post. Please login or register an account.
Since when you remove the header extension, things work, sounds like there is a problem with your header template. Leaving the extend code on as normal, try doing the try/except thing I mentioned.
So let us encase your dashboard page in a try and except, it would look like this:
Now, when you visit the page, rather than a 500, you will at least get the error. Maybe a typo, maybe you didn't close off the block body tags... etc.
-Harrison 9 years ago
You must be logged in to post. Please login or register an account.
You are awesome!! Thank you very much :) After I had added the error check you gave me I used it on def dashboard() and it told me exactly what was wrong, it had something to do with a UTF-8 error in the header file. It seemed to have been the same problem the other guy in the YouTube comments had but I couldn't figure out exactly what he was talking about. Also, you're videos are awesome keep up the good work, you definitely earned my $5/month.
-butteredmuffins 9 years ago
Last edited 9 years ago
You must be logged in to post. Please login or register an account.