Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Barmar, I tried your suggestion but still get the same exact result, KeyError: ' age '. What's wrong with it? I want to use this approach instead of f-strings. Commented Oct 29, 2021 at 20:18
  • Get rid of the spaces in { age } Commented Oct 29, 2021 at 20:21
  • Same result: KeyError: ' age ' Please check your code. I'll accept your answer when it runs. Commented Oct 29, 2021 at 20:23
  • I tested this, I don't get that error. You only get the error with the spaces. Commented Oct 29, 2021 at 20:24
  • Thank you Barmar, it DOES work. My server had disconnected. This was the answer I was looking for. Thank you for not using f-strings. Commented Oct 29, 2021 at 20:32