Unable to complete "Your first transaction" Python SDK

I’ve re-edited your post to write code in triple backquotes so that it’s easier to read.

Most likely the issue is that the sandbox is not running properly.
See all the discussion on Error in Example - Build with Python - #3 by fabrice

(Your error message is not complete, so we cannot be completely certain it’s the issue.)