<p>While I did wait for the blockchain to download and to see if Bitcoin-Core could simply read its own file. The program failed to read in any of the info from my wallet.dat file, even after following the instructions in the post listed in my initial question. I ended up using <a href="https://github.com/akx/walletool" rel="nofollow noreferrer">walletool</a>, which worked without a hitch. It gave me a list of every public and private key associated with the wallet. It has a script for checking your balance, but I was unable to get it to work reasonably quickly and ended up manually checking the balances of each address using <a href="https://bitref.com" rel="nofollow noreferrer">bitref</a>.</p>

CC BY-SA 4.0
2019-06-01T00:20:47.300Z
2019-06-01T00:20:47.300Z
ClearHandle
<p>So I found my old mining wallet from 2012 that I earned some 0.5BTC on, but I'm having trouble accessing the file. I've tried following the instructions here (<a href="https://bitcoin.stackexchange.com/questions/59699/opening-an-old-wallet-dat">opening an old wallet.dat</a>), but I'm running into an error using the pywallet program. It throws</p>

<p>File "pywallet.py", line 852
    _p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2FL
                                                                           ^
SyntaxError: invalid syntax</p>

<p>I've tried adding it into a new install of Bitcoin Core, but it appears as though I need to download the blockchain before it will scan my wallet as it isn't showing me any info about the wallet (like previous receiving address). Let me know if I can provide more information.</p>

CC BY-SA 4.0
2019-05-24T14:44:35.923Z
You're probably using Python 3: you need to use Python 2 in order to run pywallet
circulosmeos
CC BY-SA 4.0
2019-05-24T15:15:28.203Z
Thanks for the suggestion. I switched over to python 2.7, but was running into the same issues. Managed to clean up the syntax and install bsddb, but I'm running into further issues. Now it is throwing:
  File "pywallet.py", line 27, in <module>
    from bsddb3.db import *
  File "C:\Python27\lib\site-packages\bsddb3\__init__.py", line 49, in <module>
    import _pybsddb
ImportError: No module named _pybsddb
ClearHandle
CC BY-SA 4.0
2019-05-24T21:07:32.233Z
That one should be harmless: do you have any more error lines?
circulosmeos
CC BY-SA 4.0
2019-05-27T06:11:17.830Z
No. Might it have to do with the change I made on line 27? Before it was 'from bsddb.db import *', but I received an ImportError for no module named bsddb.db, so I changed it to 'from bsddb3.db import *' to match the installed library.
ClearHandle
CC BY-SA 4.0
2019-05-30T00:39:20.750Z
The code should handle that: What version are you using? Latest code for pywallet (https://github.com/jackjack-jj/pywallet/blob/master/pywallet.py) has that on line 20, not 27. Maybe you're using an older version?
circulosmeos
CC BY-SA 4.0
2019-06-01T00:14:08.257Z
I ended up using another tool, thank you for your help and patience though.
ClearHandle
<wallet>
Trying to access an old wallet.dat
ClearHandle
# Trying to access an old wallet.dat

(Asked by: username_0 on 2019-05-24)

So I found my old mining wallet from 2012 that I earned some 0.5BTC on, but I'm having trouble accessing the file. I've tried following the instructions here ([opening an old wallet.dat](https://bitcoin.stackexchange.com/questions/59699/opening-an-old-wallet-dat)), but I'm running into an error using the pywallet program. It throws

File "pywallet.py", line 852
\_p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2FL
^
SyntaxError: invalid syntax

I've tried adding it into a new install of Bitcoin Core, but it appears as though I need to download the blockchain before it will scan my wallet as it isn't showing me any info about the wallet (like previous receiving address). Let me know if I can provide more information.

**Tags:** wallet

> **Comments:**
> **username_1**: You're probably using Python 3: you need to use Python 2 in order to run pywallet  
> **username_0**: Thanks for the suggestion. I switched over to python 2.7, but was running into the same issues. Managed to clean up the syntax and install bsddb, but I'm running into further issues. Now it is throwing:   File "pywallet.py", line 27, in <module>     from bsddb3.db import *   File "C:\Python27\lib\site-packages\bsddb3\__init__.py", line 49, in <module>     import _pybsddb ImportError: No module named _pybsddb  
> **username_1**: That one should be harmless: do you have any more error lines?  
> **username_0**: No. Might it have to do with the change I made on line 27? Before it was 'from bsddb.db import *', but I received an ImportError for no module named bsddb.db, so I changed it to 'from bsddb3.db import *' to match the installed library.  
> **username_1**: The code should handle that: What version are you using? Latest code for pywallet (https://github.com/jackjack-jj/pywallet/blob/master/pywallet.py) has that on line 20, not 27. Maybe you're using an older version?  
> **username_0**: I ended up using another tool, thank you for your help and patience though.  

---

## 1 answers

### Answer by username_0 on 2019-06-01. Score: 0 | Accepted answer

While I did wait for the blockchain to download and to see if Bitcoin-Core could simply read its own file. The program failed to read in any of the info from my wallet.dat file, even after following the instructions in the post listed in my initial question. I ended up using [walletool](https://github.com/akx/walletool), which worked without a hitch. It gave me a list of every public and private key associated with the wallet. It has a script for checking your balance, but I was unable to get it to work reasonably quickly and ended up manually checking the balances of each address using [bitref](https://bitref.com).


---

