Bitcoin Forum
January 17, 2017, 11:36:50 PM *
News: Latest stable version of Bitcoin Core: 0.13.2  [Torrent]. (New!)
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Really need help with corrupt wallet, tried everything...  (Read 880 times)
Offline Offline

Activity: 1

View Profile
July 21, 2012, 12:07:36 AM

Hi guys,

I just registered on this forum but I'm actually not a new bitcoin user (as will become apparent below).

Recently I transferred about 50BTC from Mt. Gox to my wallet (done this many times before without incident). The transaction seemed like it was taking long, so I looked at my Bitcoin client and realized it was telling me to URGENTLY update. Thinking this might be slowing down/preventing my new transaction, I closed Bitcoin, downloaded the newest version, ran it...and it crashed when loading my wallet.

I tried clearing the non-wallet.dat files, and it started giving me a runtime error.

I found a guide to "fixing" my wallet with bitcointools, but I'm no Python master (Windows 7 machine here) and I can't seem to get past this lack of a bsddb.db file when I try to run the tools to fix the wallet. I found the appropriate files online from Berkely DB, but I can't for the life of me figure out how to "install" it. Their file with the windows installer didn't seem to work either, as it gave me an error every time it ran.

Then, I tried reinstalling my old version - 0.3.2. I realized when downloading it that wallets were not encrypted back then. The old version started up fine and I thought I had fixed it, but when it reached a block in the 120000s, it crashed, and does so every time.

I'm not sure if the new version screwed up my wallet or what, but I'm really upset about this and I've been fervently trying to fix it for the last two days. I have the Bitcoin Address where my 50BTC transaction took place, but I can't figure out how to extract the appropriate private key (or any) from the wallet to use it.

If anyone could PLEASE:
1) help me with installing bsddb.db on Windows so I can run the tools and fix my wallet;
2) some way to get a private key out of an unencrypted wallet (or whatever 0.3.2 is);
3) another solution.

I'm not replete with money, so I would be EXTREMELY grateful if anyone could help me out. I'm willing to post any info/logs/etc that may be needed.

Thank you all so much.
Hero Member
Offline Offline

Posts: 1484696210

View Profile Personal Message (Offline)

Reply with quote  #2

Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Offline Offline

Activity: 1582

View Profile
July 21, 2012, 12:43:53 AM

I don't know if this will help, but I can tell you what I did to recover a wallet I had in cold storage.

First, I used pywallet to extract the private key for my address from the wallet.dat file

Then I just imported the address - key pair into my new client (I'm using Electrum, which I like since you don't have download the blockchain yourself).

This of course leaves out lots of detail about how exactly to do these things, but the basic idea is that you may be better off at this point trying to extract the address - key pair from the wallet.dat rather than trying to make this file work with a new client. Keep in mind that if you have spent from this wallet, then  there will be more than one address - key pair that will have funds, so you will want to save all the pairs just in case.

Also, before you start, I would back up your wallet.dat (if you haven't already) just in case you corrupt it while trying to extract the address - key pairs. 
Stephen Gornick
Offline Offline

Activity: 2030

View Profile
July 21, 2012, 01:45:35 AM

Firstly, make sure you have backups of your wallet.dat.  Don't overwrite old backups, just in case.

I closed Bitcoin, downloaded the newest version, ran it...and it crashed when loading my wallet.

The latest version is more strict.  If there's a problem with your wallet.dat, the older versions might not have barked.

You might try a completely clean install (remove all files but wallet.dat) with a previous version of bitcoin.exe, like v0.5.4, along with a fresh, already complete blockchain download, and use your wallet.dat.


3) another solution.

One option is to have someone technical recover your coins for you and send a payment to you (once you then start over with a clean, encrypted and backed-up wallet).   Of course, you'ld only want to do that with someone trusted but I've seen that method recover coins.  But that should be a last resort.

Try 0.5.4 with a full blockchain first though.  Perhaps that will at least get you to the point where you can open the client and send the funds to a new wallet.

John (John K.)
Global Troll-buster and
Offline Offline

Activity: 1106

Will read PM's. Have more time lately

View Profile
July 21, 2012, 01:56:32 AM

Windows installation:
 1. Install Python 2.7
 2. Install Twisted 11.0.0 for Py2.7, then Zope.Interface (a .egg file) for Py2.7:

 3. Untested, proposed by TeaRex: install Zope.Interface from

 If this doesn't work, you will have to install the egg file:

 3(32bit). to install setuptools
 3(64bit). to download, then run

 4. Go to C:\Python27\Scripts
 5. Run easy_install.exe zope.interface-3.6.4-py2.7-win-amd64.egg

After that, download joric's at
Throw that inside C:\python27
Make a .bat file, and put:

C:\Python27\python.exe --dumpwallet --password=FILLYOURPASSWORD

inside. Remember to put your wallet password to replace FILLYOURPASSWORD, and add:
if your wallet.dat isn't at the regular place, add '--datadir=DATADIR ' with DATADIR at the location of wallet.dat

Copy the contents of the CMD window down to a text file. If you have ONLY received coins on a couple of address, find them and copy the data for the 'sec' column.  Just make a wallet, and import those privatekeys to the wallet (choose Sipa wallet format or Base54, I've forgotten that). You'll see the balance there. Afterwards, just get a new wallet file by deleting the old wallet (BACKUP FIRST) and restarting the bitcoin client. Try sending test amounts of coins to it (faucet?) ,and if it works just send the coins back to it. You can also try other alternative clients like Electrum or Armory.

Your wallet should be dumped with JSON format, then you can import it to (easiest) or Armory and other clients.

My BTC Tip Jar: 1Pgvfy19uwtYe5o9dg3zZsAjgCPt3XZqz9 , GPG ID: B3AAEEB0 ,OTC ID: johnthedong
Escrow service is available on a case by case basis! (PM Me to verify I'm the escrow!)

Offline Offline

Activity: 1582

View Profile
July 21, 2012, 05:26:38 AM

I hope you get this sorted out, and when you do, I strongly recommend saving (very securely) your address - key pairs in addition to your wallet.dat. Maybe it doesn't matter, but I've noticed people having all kinds of trouble resurrecting saved wallet files. But it's very straightforward if you have the address - key pairs.
Offline Offline

Activity: 67

View Profile
August 07, 2012, 12:50:40 PM

I'm sorry, but never ever used Twisted and Zope.Interface.
So, the real installation should be like:
1. Install Python-2.7.2.msi (bsddb included).
That's basically, all.

Full Member
Offline Offline

Activity: 126

View Profile
October 17, 2012, 10:08:41 PM

If this helps anyone and they want to reward me (not expecting anything),
My address is 12fuR1FF753m9E5PKiK6wU7RSHX23WoQng


Install Bitcoin

(assuming you have a copy of your wallet.dat file first in a safe place)

delete the contents of your bitcoin directory (it's a hidden directory so you need to enable view hidden files)

Ubuntu = Home\.bitcoin

Windows XP = C:\Documents and Settings\YourUserName\Application data\Bitcoin

Vista/7 = C:\Users\YourUserName\Appdata\Roaming\Bitcoin

Disable all network connections

Start the bitcoin program

Once it's finished loading, close it.

Now copy your wallet.dat file into the bitcoin directory

Enable your internet connections

Start the bitcoin program and it will work

(You can see your old wallet addresses and the blocks start downloading without giving an error.)
Sr. Member
Offline Offline

Activity: 406

View Profile
October 18, 2012, 01:27:11 AM

Did you have system protection enabled for that drive in win 7? If so, you make backups of anything you don't want to lose and restore to a point before you updated... this should get you a working copy of your old (pre-update) bitcoin with working wallet.

Then you can extract private keys using standard methods.

After that you may have be allright... if not OS reinstall - etc.

Bitcoin: Because the internet needed its own currency.
Bitcoin is a modern Schrödinger's Cat. Everything about it is both scamy and fully legitimate at the same time, until you open the box.
Full Member
Offline Offline

Activity: 160

View Profile WWW
October 18, 2012, 02:15:54 AM

Ekkk, scary situation, any luck yet?

Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!