darkdragn / lz4tools

LZ4Frame Bindings and tools for Python
90 stars 30 forks source link

Can't decompress lz4 file #7

Open rafaelzimmermann opened 8 years ago

rafaelzimmermann commented 8 years ago

I can't decompress any file and the unit test from the project is not passing.

System: OSX 10.10.5 Python 2.7.10

.Unable to load blockDict. Possibly not a lz4 file.

E

ERROR: test_2_file (main.TestLZ4File)

Traceback (most recent call last): File "tests/test.py", line 12, in test_2_file testTar = lz4tools.openTar('src.tar.lz4') File "/Users/zimmermann/workspace/lz4tools/lz4tools/init.py", line 109, in openTar return Lz4Tar.lz4open(name, 'r', fileObj) File "/Users/zimmermann/workspace/lz4tools/lz4tools/lz4tar.py", line 20, in lz4open lz4FileOut = Lz4File.open(fileObj=fileobj) File "/Users/zimmermann/workspace/lz4tools/lz4tools/lz4file.py", line 39, in open return cls(name, fileObj, seekable) File "/Users/zimmermann/workspace/lz4tools/lz4tools/lz4file.py", line 29, in init self.load_blocks() File "/Users/zimmermann/workspace/lz4tools/lz4tools/lz4file.py", line 73, in load_blocks data = self.read_block(blkSize, setCur=False) File "/Users/zimmermann/workspace/lz4tools/lz4tools/lz4file.py", line 138, in read_block resultDict = lz4f.decompressFrame(compData, self.dCtx, self.blkSizeID) RuntimeError: More keyword list entries (4) than format specifiers (3)


Ran 2 tests in 0.010s

FAILED (errors=1)

darkdragn commented 8 years ago

Interesting. I haven't been able to test it on OSX. I may have to re-work some of the code to make it compatible. I’ll take a look at it tonight when I get off of work. V/R, Chris

On Mon, Nov 9, 2015 at 2:53 AM, Rafael Zimmermann notifications@github.com wrote:

I can't decompress any file and the unit test from the project is not passing.

System: OSX 10.10.5 Python 2.7.10

.Unable to load blockDict. Possibly not a lz4 file. E ERROR: test_2_file (main.TestLZ4File)

Traceback (most recent call last): File "tests/test.py", line 12, in test_2_file testTar = lz4tools.openTar('src.tar.lz4') File "/Users/zimmermann/workspace/lz4tools/lz4tools/init.py", line 109, in openTar return Lz4Tar.lz4open(name, 'r', fileObj) File "/Users/zimmermann/workspace/lz4tools/lz4tools/lz4tar.py", line 20, in lz4open lz4FileOut = Lz4File.open(fileObj=fileobj) File "/Users/zimmermann/workspace/lz4tools/lz4tools/lz4file.py", line 39, in open return cls(name, fileObj, seekable) File "/Users/zimmermann/workspace/lz4tools/lz4tools/lz4file.py", line 29, in init self.load_blocks() File "/Users/zimmermann/workspace/lz4tools/lz4tools/lz4file.py", line 73, in load_blocks data = self.read_block(blkSize, setCur=False) File "/Users/zimmermann/workspace/lz4tools/lz4tools/lz4file.py", line 138, in read_block resultDict = lz4f.decompressFrame(compData, self.dCtx, self.blkSizeID)

RuntimeError: More keyword list entries (4) than format specifiers (3)

Ran 2 tests in 0.010s

FAILED (errors=1)

— Reply to this email directly or view it on GitHub https://github.com/darkdragn/lz4tools/issues/7.

darkdragn commented 8 years ago

Sorry for the late reply, I'm looking around but I don't have anything running OSX, and I currently don't know anyone who does that I can test this on. I know this is working properly on linux, however without an OSX system to run tests on and t/s I'm not sure there's much I can do... sorry. I'm looking into getting a VM running a hackentosh derivative as an alternative.

V/R, Chris

bejvisek commented 8 years ago

Hi, I would like to report the same issue. I have installed lz4tools using pip at Mac OS and I keep gettings this:

>>> import lz4tools
>>> lz4tools.compressFileDefault('README.rst')
>>> lz4tools.compressFileDefault('README.rst.lz4')
>>> lz4tools.compressFileDefault('build.tar')
>>> file = lz4tools.openTar('build.tar.lz4')
Unable to load blockDict. Possibly not a lz4 file.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "lz4tools/__init__.py", line 134, in openTar
    return Lz4Tar.lz4open(name, 'r', fileObj)
  File "lz4tools/lz4tar.py", line 21, in lz4open
    raise ReadError('Not a lz4 file')
NameError: global name 'ReadError' is not defined
darkdragn commented 8 years ago

I still haven't had a chance to get a hold of something running OSX. If one of you gets a chance to read this, could you please run ./lz4toolsCli README.rst then send me the resulting README.rst.lz4. I'll use that a a baseline to figure out what I can do for OSX.

rafaelzimmermann commented 8 years ago

@darkdragn Here is the output for the command. README.rst.lz4.zip

Sorry for the late response. Thank you very much for taking a look at it. /cc @bixu

bixu commented 8 years ago

@darkdragn @rafaelzimmermann excited to try this once fixed!

darkdragn commented 8 years ago

@rafaelzimmermann https://github.com/rafaelzimmermann Thanks for posting the results. I'll take a look, and see what I can do about this as soon as I get off of work. ^_^

On Thu, Jan 14, 2016 at 10:02 AM, Blake Irvin notifications@github.com wrote:

@darkdragn https://github.com/darkdragn @rafaelzimmermann https://github.com/rafaelzimmermann excited to try this once fixed!

— Reply to this email directly or view it on GitHub https://github.com/darkdragn/lz4tools/issues/7#issuecomment-171683122.