Get input address using VIN txid?
That error means that either response or response['result'] is None which means that getrawtransaction is probably unable to find the transaction id that you are providing.

Before you try to read data from the response, make sure it isn't None and actually has a result.