Git Product home page Git Product logo

pyblockchain's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pyblockchain's Issues

unpack_from requires a buffer of at least 88 bytes

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?

Undeclared dependency on `typing` module

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
>>> 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.