Sorry for the delay... I suspect that either the wallet is badly corrupted or it is indeed encrypted and the password you are using is wrong, hence the script being unable to read it properly...
Especially in light of the message you're getting from current Bitcoin Core saying that it is corrupted.
I'm wondering if could be struggling with an old wallet format? What version of bitcoin-qt were you using originally with this wallet?