MemoryError after first block is parsed
Ziggy644 opened this issue · comments
Traceback (most recent call last):
File "D:\parser\blockchain-parser.py", line 167, in
tmpHex = read_bytes(f,scriptLength,'B')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\parser\blockchain-parser.py", line 33, in read_bytes
data = file.read(n)
^^^^^^^^^^^^
MemoryError
You trying to parse Bitcoin data or may be some altcoin?
No, just Bitcoin. It also seems to happen at other blocks indexes.
Can you share this binary blk file? I try to check
I figured out the issue myself; I'm using an older Bitcoin-qt version (0.14.3). Because of this, the script sometimes returns an incorrect tx input script size (over 10GB) which causes Python to return a MemoryError. I'm not sure this happens with the newest version of Bitcoin-qt.
Bitcoin-QT version does not matter, sometimes all versions add to the binary data 1 strange 00 byte, that not documented anywhere