Ask coding questions

← Back to all posts
500 Internal Server Error but error is not in server
isaiah08 (86)

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 (2302) [earned 5 cycles]
View Answer
Comments
hotnewtop
ch1ck3n (2302)

Try turning debug mode on

isaiah08 (86)

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

ch1ck3n (2302)

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

Coder100 (18806)

Maybe want to check this line out:

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

ch1ck3n (2302)

Why is /login in non_login_paths lol

Coder100 (18806)

because you use it to log in
@ch1ck3n

isaiah08 (86)

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

ch1ck3n (2302)

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