On line 345 of psbt.py , in the function b64_psbt, you use "serialized_psbt" but the function is named serialized.