It's not working because there is no contract rpc calls for what you are trying to do. If you are wanting to parse the account history, you have to call a history api, as far as I know there is only one: https://accounts.hive-engine.com/accountHistory
you can read more about it on the github for the history api
It should look something like this:
response = requests.get(f"https://accounts.hive-engine.com/accountHistory?account={account}&limit={limit}&offset={offset}&symbol={symbol}")
And it should give you a response that looks something like:
Unfortunately this means you are going to have to start this script from scratch as the only call that looks valid in it is the one to fetch the latest block (but you are not parsing the output correctly so you will always get the exception in that.)