Finally I got it fixed by using the berkeley db tools db_recover and db_dump (on windows these can be obtained for example by building berkeley db with easywinbuilder included in the namecoin source under contrib) and then reimporting the private keys with a modified pywallet version.ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.
Fixing Corrupted Wallets
Fixing Corrupted Wallets
I managed to badly corrupt an relatively important (and large) wallet. The client and various tools like fixwallet and pywallet bailed on opening with errors like: