Day 085 - Project 85 : Don't be stateless

If you have any questions, comments or issues with this project please post them here!

“RuntimeError: The session is unavailable because no secret key was set. Set the secret_key on the application to something unique and secret.”

I’ve already set the secret key, what’s wrong?

My Day 85

Hi Admins, I noticed that David’s Solution to the Broken Code (Fix my code) is not working :frowning:
Can you please check why?

oh ok, I actually found out why…
He’s using

if session["myName"]:

instead of

if session.get("myName"):

What makes the difference here?

Is the course using a database or a list?


.get() looks for the key. If it doesn’t exist, it returns the second parameter (or None if it isn’t given)


in this case it is using the replit secrets

1 Like

I’ve always been having an error for logging out, and I don’t know why. Every time I click logout, it keeps sending me back to /hi.

Here’s my code

For someone so fixated on Yul, why has @LessonHacker spelt Yul Brynner’s name wrong! :rofl: :man_bald:
(Edit: his real surname was Briner)