Skip to content
← Back to Community
500 Internal Server Error but error is not in server
Profile icon
isaiah08

If you go to the homepage, it gives you a 500 error. But when you look in the console, you don't see any error. Why?

Answered by ch1ck3n [earned 5 cycles]
View Answer
Voters
Profile icon
isaiah08
Comments
hotnewtop
Profile icon
ch1ck3n

Try turning debug mode on

Profile icon
isaiah08

Thanks! It shows the error now. It turns out that in python/config.py, it calls for the .env SECRET_KEY, but there is none, so it returns None. You then can't have a flask_wtf form without a SECRET_KEY configged to the application, so that was giving it the error. @ch1ck3n

Profile icon
ch1ck3n

@isaiah08 You're welcome! Please click the checkmark next to my name to pay respects.

Profile icon
Coder100

Maybe want to check this line out:

image

'/login' not in request.path is always going to be false just saying

Profile icon
ch1ck3n

Why is /login in non_login_paths lol

Profile icon
Coder100

because you use it to log in
@ch1ck3n

Profile icon
isaiah08

yeah, if you have to log in to go to the login page, you can never log in! @ch1ck3n

Profile icon
ch1ck3n

@Coder100 But it says non_login... ohhhhh i get it