are you using the latest version of PyWallet? (that has been updated recently by jackjack) or are you using the old version?
Also, where is your wallet.dat actually located? The
--datadir value you are using is where Python should be installed to... not where your wallet.dat is likely to be located unless you manually copied it there.
I copy wallet.dat to folder for test
Try jackjack pywallet.py got same result
python pywallet.py --dumpwallet --wallet=C:\python\27\008\wallet.dat
(22, 'Invalid argument -- C:\\python\\27\\008\\wallet.dat: unexpected file type or format')
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.
I test change wallet.dat to other one normal (this file success to dumpwallet)
result can dumpwallet success no problem (use same command)
actually file that have problem this one , when I copy back to bitcoin data folder and run bitcoin again and close program correct and try dumpwallet it is work normal
Just want to know how to fix it (not serious )
this file have problem when copy/rename from bitcoin open and not close (between use)
inside file will have all data still in there but some locked file when using or head data have problem
I think if bitcoin program error , hang, freeze, not respond, make file have problem to read program not close normal