Author

Topic: Need help troubleshooting recovery of wallet.dat using python and pywallet (Read 82 times)

legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook

OK, thanks. I installed MacPorts from your link, as well as the XCode dev tools from the App Store.
However, when I try to run "port" from the command line, I get the error that it cannot find it:

root# port
-sh: port: command not found

Where was it installed? I cannot locate it.

Also, I cannot run the install the command line xcode tools:

root# xcode-select --install
xcode-select: note: install requested for command line developer tools


Honestly, I am not so familiar with the errors. All the suggestions that I provided came from github pages and from that pywallet github page. If it doesn't work for you, then I think you need another device to make pywallet work.

Do you have other laptops/PCs with Windows OS? Or you might need a parallel or emulator to emulate a Windows OS in your Mac just for the sake of this tool pywallet.
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
You located an old wallet.dat file on some of your old drives. Why do you need to use pywallet at all? If the wallet.dat file isn't corrupted then why don't you simply open it in Bitcoin Core (you may use some older versions of Core instead of the very recent one)?
brand new
Activity: 0
Merit: 0
OK, did all that, downgraded my python to 2.7 and my pywallet to the older jj version.

New errors:

Code:
root# python2.7 pywallet.py --dumpwallet --wallet=wallet.dat
WARNING:root:pycrypto or libssl not found, decryption may be slow
Warning: 'ecdsa' package is not installed, so you won't be able to sign/verify messages but everything else will work fine
Traceback (most recent call last):
  File "pywallet.py", line 4139, in
    db_env = create_env(db_dir)
  File "pywallet.py", line 1489, in create_env
    r = db_env.open(db_dir, (DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_THREAD|DB_RECOVER))
bsddb.db.DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- /usr/local/bin: No such file or directory')


It seems there are some dependencies that are not installed yet. You need to install them and let's see if this issue is solved.

Are you sure that you installed some dependencies from the link I provided?
If you are using MacOS you need to install the Macports as suggested from the link above.

And then use this command below

Code:
sudo port install python27 py27-twisted py27-pip py-bsddb python_select
sudo port select --set python python27
sudo easy_install ecdsa

Once it's successful now try to dump the wallet again.

OK, thanks. I installed MacPorts from your link, as well as the XCode dev tools from the App Store.
However, when I try to run "port" from the command line, I get the error that it cannot find it:

root# port
-sh: port: command not found

Where was it installed? I cannot locate it.

Also, I cannot run the install the command line xcode tools:

root# xcode-select --install
xcode-select: note: install requested for command line developer tools

Thanks for your help, so much appreciated.
(Since there is no restriction apparently on paying fees for assistance, I can offer a recovery assistance fee if this wallet gets recovered?  I will do that if the forum allows it.)
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
Traceback (most recent call last):
  File "pywallet.py", line 4139, in
    db_env = create_env(db_dir)
  File "pywallet.py", line 1489, in create_env
    r = db_env.open(db_dir, (DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_THREAD|DB_RECOVER))
bsddb.db.DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- /usr/local/bin: No such file or directory')
This is quite self-explanatory: pywallet can't create database recovery environment in /usr/local/bin because it cannot find the directory.
The other errors aren't mandatory as stated.

If the directory is indeed not existing, you can create one yourself using mkdir with rwxr-xr-x permission:
Code:
sudo mkdir -p -m 755 /usr/local/bin
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
OK, did all that, downgraded my python to 2.7 and my pywallet to the older jj version.

New errors:

Code:
root# python2.7 pywallet.py --dumpwallet --wallet=wallet.dat
WARNING:root:pycrypto or libssl not found, decryption may be slow
Warning: 'ecdsa' package is not installed, so you won't be able to sign/verify messages but everything else will work fine
Traceback (most recent call last):
  File "pywallet.py", line 4139, in
    db_env = create_env(db_dir)
  File "pywallet.py", line 1489, in create_env
    r = db_env.open(db_dir, (DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_THREAD|DB_RECOVER))
bsddb.db.DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- /usr/local/bin: No such file or directory')


It seems there are some dependencies that are not installed yet. You need to install them and let's see if this issue is solved.

Are you sure that you installed some dependencies from the link I provided?
If you are using MacOS you need to install the Macports as suggested from the link above.

And then use this command below

Code:
sudo port install python27 py27-twisted py27-pip py-bsddb python_select
sudo port select --set python python27
sudo easy_install ecdsa

Once it's successful now try to dump the wallet again.
brand new
Activity: 0
Merit: 0
OK, did all that, downgraded my python to 2.7 and my pywallet to the older jj version.

New errors:

root# python2.7 pywallet.py --dumpwallet --wallet=wallet.dat
WARNING:root:pycrypto or libssl not found, decryption may be slow
Warning: 'ecdsa' package is not installed, so you won't be able to sign/verify messages but everything else will work fine
Traceback (most recent call last):
  File "pywallet.py", line 4139, in
    db_env = create_env(db_dir)
  File "pywallet.py", line 1489, in create_env
    r = db_env.open(db_dir, (DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_THREAD|DB_RECOVER))
bsddb.db.DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- /usr/local/bin: No such file or directory')
legendary
Activity: 3584
Merit: 5243
https://merel.mobi => buy facemasks with BTC/LTC
I have all the old versions of bitcoin core inside a docker container... If you have access to a linux desktop/laptop/vps/server, you can try to run bitcoin core version from around the time your wallet was made and see if it loads your wallet? You should run the container in offline mode!!


https://mocacinno.com/versions/
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
Would you mind to tell us where did you get the pywallet.py that use to dump wallet.dat?
Based on the error it seems its a compatibility issue the pywallet only works on version 2.7.

Can you try the pywallet.py from jackjack-jj from this link below

- https://github.com/jackjack-jj/pywallet

Make sure to downgrade your python to 2.7 and follow the instruction from the link above.
brand new
Activity: 0
Merit: 0
Trying to recover an old (2014) wallet.dat file that I recently located on an old hard drive, that I mined with Bfgminer.

Here is the error I get when running the command that was recommended on another thread:

root# python3.13 pywallet.py --dumpwallet --wallet=wallet.dat
/usr/local/bin/pywallet.py:22: UserWarning: Python 3 support is still experimental, you may encounter bugs
WARNING: /Library/Frameworks/Python.framework/Versions/3.13/Resources/Python.app/Contents/MacOS/Python is loading libcrypto in an unsafe way
Abort trap: 6

Anyone have any idea what I can try?  Thanks much!
Jump to: