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:


 if session["myName"]:


 if session.get("myName"):  

Bug appears at this link:

Screenshot(s)/Screen Recording:

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

Replit Profile:

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.