Ex50 from lpthw

when i run python3 app.py and hit http://localhost:5000/ in my browser i see: Hello, {greeting}! instead of Hello, World! as shown in the screenshot attached.

please explain what is happening. the codes are in the screenshot itself.

thank you.

Screenshot from 2020-06-01 15-59-43
Screenshot from 2020-06-01 15-52-43

You are missing the format string indicator from before the string in line 7.

i.e.

return f”Hello, {greeting}”

thank you gpkesley. that’s the mistake exactly. but not my mistake alone. that was missing from the lpthw book even. damn troubled me a lot.
thanks man.

1 Like