Try making the hash like this hashlib.sha256(bytes.fromhex(preimage)).hexdigest()
It’s cause the preimage is in hex format
I knew you were the right guy Thanks, homie! That worked!