Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: cablepair on September 17, 2011, 02:01:10 AM



Title: [BOUNTY] need help getting recovered wallet.dat to work
Post by: cablepair on September 17, 2011, 02:01:10 AM
Hello

I have a problem for the Bitcoin geniuses. I had a Bitcoin wallet on an office computer with coins in it, well the network administrator decided he was going to format the hard drive and reinstall Windows 7 on it. So I used EASEUS recovery wizard and was able to recover wallet.dat. So I reinstalled Bitcoin and then copied wallet.dat into the Bitcoin directory and tried to run Bitcoin, bit Bitcoin wont run with all kinds of errors.

like this:
exception: 11dbexception DB:: open: invalid argument

I will gladly pay someone 2 BTC who can help me to recover this wallet and get the coins inside
thank you


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: ineededausername on September 17, 2011, 04:06:36 AM
Hi cablepair,
Delete blk0001.dat and addr.dat.  Then open bitcoin up again.  Tell me if you still have the same error.


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: joulesbeef on September 17, 2011, 04:19:03 AM
yeah i had that happen, use bitcointools, run fixwallet.py (https://bitcointalk.org/index.php?topic=11331.0)

try what  ineededausername says first.


if that doesnt work there are a couple other tools, but that is how i fixed mine and had same error.

i didnt do any of the striping  "--noaccounts --nosettings --notxes --nopubkeys"  but mine might not have been as corrupted. If you want me to fix it for ya, pm me.


pywallet (https://bitcointalk.org/index.php?topic=34028.0) is a great tool as well. and you can just export your keys and import them in a new wallet.
and then their is this tool, i havent tried yet (https://bitcointalk.org/index.php?topic=25091.0)





Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: cablepair on September 17, 2011, 11:10:55 AM
Hi cablepair,
Delete blk0001.dat and addr.dat.  Then open bitcoin up again.  Tell me if you still have the same error.

That did not work, thank you though

yeah i had that happen, use bitcointools, run fixwallet.py (https://bitcointalk.org/index.php?topic=11331.0)

try what  ineededausername says first.


if that doesnt work there are a couple other tools, but that is how i fixed mine and had same error.

i didnt do any of the striping  "--noaccounts --nosettings --notxes --nopubkeys"  but mine might not have been as corrupted. If you want me to fix it for ya, pm me.


pywallet (https://bitcointalk.org/index.php?topic=34028.0) is a great tool as well. and you can just export your keys and import them in a new wallet.
and then their is this tool, i havent tried yet (https://bitcointalk.org/index.php?topic=25091.0)





when I try to run fixwallet.py it says
ERROR:root could not open wallet.dat/main try quitting Bitcoin and running this again (but of course Bitcoin is closed)

any ideas?


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: cablepair on September 17, 2011, 12:25:27 PM
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.

Traceback (most recent call last):
  File "C:\Users\Thomas Van Riper\Downloads\gavinandresen-bitcointools-45f5c00\gavinandresen-bitcointools-45f5c00\fixwallet.py", line 61, in <module>
    main()
  File "C:\Users\Thomas Van Riper\Downloads\gavinandresen-bitcointools-45f5c00\gavinandresen-bitcointools-45f5c00\fixwallet.py", line 56, in main
    rewrite_wallet(db_env, options.outfile)
  File "C:\Users\Thomas Van Riper\Downloads\gavinandresen-bitcointools-45f5c00\gavinandresen-bitcointools-45f5c00\wallet.py", line 289, in rewrite_wallet
    db = open_wallet(db_env)
  File "C:\Users\Thomas Van Riper\Downloads\gavinandresen-bitcointools-45f5c00\gavinandresen-bitcointools-45f5c00\wallet.py", line 26, in open_wallet
    sys.exit(1)
SystemExit: 1
>>>
that is the exact error from the python window


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: cablepair on September 17, 2011, 01:08:43 PM
as a matter of fact I get that same error when running any of the tools on wallet.dat

:(


C:\Users\Thomas Van Riper\Downloads\gavinandresen-bitcointools-45f5c00\gavinandr
esen-bitcointools-45f5c00>dbdump.py --wallet
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this
again.

C:\Users\Thomas Van Riper\Downloads\gavinandresen-bitcointools-45f5c00\gavinandr
esen-bitcointools-45f5c00>dbdump.py --wallet wallet.dat
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this
again.

C:\Users\Thomas Van Riper\Downloads\gavinandresen-bitcointools-45f5c00\gavinandr
esen-bitcointools-45f5c00>


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: cablepair on September 17, 2011, 01:22:17 PM
damn, you know what I think the problem is? I can't change a system directory to not be read only, by default these tools look for wallet.dat in my user directory which is set to read only and which I can't change, not even on the command prompt with attrib -r

is there anyway I can run this fixwallet.py on a wallet.dat in another directory than the default one?

thanks


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: ineededausername on September 17, 2011, 02:41:21 PM
Firstly you could edit fixwallet.py or something but that would take too long I guess.
You could also log in to the system account and force set it to read/write but that would not be recommended.


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: joulesbeef on September 17, 2011, 04:36:07 PM
just copy over the default one to bitcoin-backup

and remove your read only protection.

you should probably try pywallet and see if you can see keys in there.


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: cablepair on September 17, 2011, 05:25:27 PM
i was completely wrong before when I said it was a permissions thing.

because its not the file is not read only.

I have no idea why, but when I use any tool at all on my recovered wallet I get above error

anyone can I help I will gladly pay you some coins, I recovered wallet.dat its 608 bytes but none of these tools will read it.


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: ajareselde on September 17, 2011, 09:38:25 PM
go to task manager and close all processes with your ID, especialy bitcoin related.

then retry with bittools.

cheers


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: cablepair on September 17, 2011, 09:46:00 PM
thats not it, I wish it was that easy. I get the same error in linux I think the file is too corrupted i need some genius who wants to take the wallet file and hexedit it and get the keys out and rebuild the wallet


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: trentzb on September 17, 2011, 10:00:09 PM
i was completely wrong before when I said it was a permissions thing.

because its not the file is not read only.

I have no idea why, but when I use any tool at all on my recovered wallet I get above error

anyone can I help I will gladly pay you some coins, I recovered wallet.dat its 608 bytes but none of these tools will read it.

608 bytes is too small.


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: cablepair on September 17, 2011, 10:28:24 PM
im sorry that was a typo, the biggest and most recent wallet.dat I was able to recover is 608 KB


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: BCEmporium on September 17, 2011, 10:40:01 PM
Sounds hard, anyway try to not use spaces in the path to either the wallet.dat or the tool.

Eg. Mkdir C:\bitcoinRepair
cp wallet.dat there
cp tools there

try to fix.


Title: Re: [BOUNTY] need help getting recovered wallet.dat to work
Post by: nhodges on September 20, 2011, 02:36:31 AM
Have you seen the modified bitcointools here?

https://bitcointalk.org/index.php?topic=11331.0