Day 85 HTTP & Sessions Fix my code answer

Bug description:
Good afternoon, I hope everyone is doing great!

I believe there’s some code mistake (this is shown in the answers from this day) on line 11:

 if session["myName"]: 

#Doesn't call out the .get function with ():

Expected vs Current Behavior:

if session.get("myName"):

Steps to reproduce:

change

 if session["myName"]:

for

 if session.get("myName"):  

Bug appears at this link: https://replit.com/~?supportform=true

Screenshot(s)/Screen Recording:

Browser/OS/Device: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36

Replit Profile: https://replit.com/@JosueReyes10

1 Like

Yes, session["myName"] is valid, as is session.get("myName"); both cases are correct. Looking at your screenshots, the error seems to be due to a space between @app.route and the index function to which it is bound.