kyegupov / py-unrar2

Automatically exported from code.google.com/p/py-unrar2
MIT License
2 stars 4 forks source link

missing data in `str contents` portion? #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Pass my ReadRarFiles function a rar file:
http://pastebin.com/YQ8X4vwG

What is the expected output? What do you see instead?
I expect to see data in the `str contents` portion of my `extracts`
variable when I print it as a string, after calling read_files() (with no
parameters, should grab everything, as it appears to be doing).

Instead I get:
http://pastebin.com/H0dEVNL0

It can't identify the image file because there is no data in the file data
section.

What version of the product are you using? On what operating system?
0.96, Win7 x64

I can provide more info if needed.

Original issue reported on code.google.com by tal...@gmail.com on 14 Apr 2010 at 12:39

GoogleCodeExporter commented 9 years ago
Here's the sample file I was working with at the time I was getting no data.

Original comment by tal...@gmail.com on 14 Apr 2010 at 12:41

Attachments:

GoogleCodeExporter commented 9 years ago
Very strange. Works for me under Windows XP.

Does the problem happen when executing the simplest code, like below?

from UnRAR2 import RarFile
archive = RarFile("Highschool_of_the_Dead_[XLG]_v3_c10_LQ.rar")
extracts = archive.read_files()
print extracts

For me, it's happily printing away contents of the files.
Will check again on Vista when I have more time.

Original comment by yk4e...@gmail.com on 22 Apr 2010 at 7:56

GoogleCodeExporter commented 9 years ago
Here, I just ran your test code this morning, looks like it has the same issue. 
 I
suppose checking with Vista first would be good, then if that works we should 
try
testing on vista 64?

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Jeff>cd \

C:\>python rarTest.py
[(<UnRAR2.RarInfo object at 0x0000000001F5B550>, ''), (<UnRAR2.RarInfo object at
0x0000000001F5B5F8>, ''), (<UnRAR2.RarInfo object at 0x0000000001F5B668>, ''),
(<UnRAR2.RarInfo object at 0x0000000001F5B630>, ''), (<UnRAR2.RarInfo object at
0x0000000001F5B6A0>, ''), (<UnRAR2.RarInfo object at 0x0000000001F5B6D8>, ''),
(<UnRAR2.RarInfo object at 0x0000000001F5B710>, ''), (<UnRAR2.RarInfo object at
0x0000000001F5B748>, ''), (<UnRAR2.RarInfo object at 0x0000000001F5B780>, ''),
(<UnRAR2.RarInfo object at 0x0000000001F5B7B8>, ''), (<UnRAR2.RarInfo object at
0x0000000001F5B7F0>, ''), (<UnRAR2.RarInfo object at 0x0000000001F5B828>, ''),
(<UnRAR2.RarInfo object at 0x0000000001F5B860>, ''), (<UnRAR2.RarInfo object at
0x0000000001F5B898>, ''), (<UnRAR2.RarInfo object at 0x0000000001F5B8D0>, ''),
(<UnRAR2.RarInfo object at 0x0000000001F5B908>, ''), (<UnRAR2.RarInfo object at
0x0000000001F5B940>, ''), (<UnRAR2.RarInfo object at 0x0000000001F5B978>, ''),
(<UnRAR2.RarInfo object at 0x0000000001F5B9B0>, ''), (<UnRAR2.RarInfo object at
0x0000000001F5B9E8>, ''), (<UnRAR2.RarInfo object at 0x0000000001F5BA20>, ''),
(<UnRAR2.RarInfo object at 0x0000000001F5BA58>, ''), (<UnRAR2.RarInfo object at
0x0000000001F5BA90>, ''), (<UnRAR2.RarInfo object at 0x0000000001F5BAC8>, ''),
(<UnRAR2.RarInfo object at 0x0000000001F5BB00>, ''), (<UnRAR2.RarInfo object at
0x0000000001F5BB38>, '')]

C:\>

Original comment by tal...@gmail.com on 23 Apr 2010 at 11:09

GoogleCodeExporter commented 9 years ago
I have tested the following configurations and it really looks like it's more 
of an
issue running with 64 bit Python:

Vista-32, python 2.6.5 x32 - Working

Vista-64, python 2.6.5 x32 - Working
==============================================================================
Vista-64, python 2.6.5 x64 - Missing module error? 

Added registry entries for Python from:
  HKEY_LOCAL_MACHINE\SOFTWARE\Python 
to 
  HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python
C:\>python
Python 2.6.5 (r265:79096, Mar 19 2010, 18:02:59) [MSC v.1500 64 bit (AMD64)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from UnRAR2 import RarFile
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\lib\site-packages\UnRAR2\__init__.py", line 45, in <module>
    from windows import RarFileImplementation
  File "C:\Python26\lib\site-packages\UnRAR2\windows.py", line 65, in <module>
    unrar = ctypes.WinDLL('unrar.dll')
  File "C:\Python26\lib\ctypes\__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found
>>>
==============================================================================

Win7-x64, python 2.6.5 x32 - Not tested yet...
Win7-x64, python 2.6.5 x64 - Not Working

Original comment by tal...@gmail.com on 24 Apr 2010 at 1:08

GoogleCodeExporter commented 9 years ago
Oh yeah. That's me being stupid.
You obviously cannot load 32-bit dll from 64-bit process: memory models are 
incompatible.
I think I can make 64-bit source distribution; but I don't have 64-bit OS to 
build
installable package.

Original comment by yk4e...@gmail.com on 24 Apr 2010 at 8:19

GoogleCodeExporter commented 9 years ago
I've added the code and dll to support win64 to svn trunk, I hope it works.
I'm going to create source distribution tomorrow.

Original comment by yk4e...@gmail.com on 2 May 2010 at 9:49

GoogleCodeExporter commented 9 years ago
See source distribution v0.97 in "Downloads".

Original comment by yk4e...@gmail.com on 8 May 2010 at 3:11