emcpow2 / pyblockchain Goto Github PK
View Code? Open in Web Editor NEW⛓ Blockchain parser for Python
⛓ Blockchain parser for Python
Current mmap position: 998179
Total mmap size: 134013860
Traceback (most recent call last):
File "test.py", line 5, in <module>
for block in block_reader:
File "/home/dnelson/projects/blockchain-parsing/venv/lib/python3.5/site-packages/blockchain/reader.py", line 35, in __iter__
raise err
File "/home/dnelson/projects/blockchain-parsing/venv/lib/python3.5/site-packages/blockchain/reader.py", line 31, in __iter__
block = Block.from_binary_data(blockchain_mview, offset=0)
File "/home/dnelson/projects/blockchain-parsing/venv/lib/python3.5/site-packages/blockchain/block.py", line 412, in from_binary_data
offset=offset,
File "/home/dnelson/projects/blockchain-parsing/venv/lib/python3.5/site-packages/blockchain/block.py", line 130, in from_binary_data
tup = struct.unpack_from(header_fmt, data, offset=offset)
struct.error: unpack_from requires a buffer of at least 88 bytes
This has happened on blocks 00600 and 00641 using the following code:
from blockchain.reader import BlockchainFileReader
block_reader = BlockchainFileReader('blocks/blk00600.dat')
for block in block_reader:
pass
Any ideas as to what might be happening?
Pyblockchain seems to depend on typing
without requiring it as a dependency in pip:
[dnelson@blueharvest blockchain-parsing]$ python
Python 3.4.2 (default, Jul 29 2015, 07:46:38)
[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from blockchain.reader import BlockchainFileReader
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dnelson/.pyenv/versions/3.4.2/lib/python3.4/site-packages/blockchain/reader.py", line 4, in <module>
from .block import Block
File "/home/dnelson/.pyenv/versions/3.4.2/lib/python3.4/site-packages/blockchain/block.py", line 11, in <module>
from typing import Sequence
ImportError: No module named 'typing'
>>> import typing
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'typing'
>>>
[dnelson@blueharvest blockchain-parsing]$ pip install typing
Collecting typing
Downloading typing-3.5.2.2.tar.gz (51kB)
100% |████████████████████████████████| 51kB 2.1MB/s
Installing collected packages: typing
Running setup.py install for typing ... done
Successfully installed typing-3.5.2.2
[dnelson@blueharvest blockchain-parsing]$ python
Python 3.4.2 (default, Jul 29 2015, 07:46:38)
[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from blockchain.reader import BlockchainFileReader
>>>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.