pylib7zip icon indicating copy to clipboard operation
pylib7zip copied to clipboard

Don't works for me...

Open LORDofDOOM opened this issue 11 years ago • 6 comments

Can't get it work...

Got this error:

lib7zip\winhelpers.py", line 20, in RNOK assert int(status) == S_OK

I've tried with multiple .dll's -> Is 9.20 win32 dll the correct file ? Or is any development dll needed ?

I've setup a hardcoded path in lib7zip.py because I've 7zip installed on x64 but use a 32bit python.

Hope you can help :-)

Thank you

LORDofDOOM avatar Oct 01 '13 07:10 LORDofDOOM

I've only tested with python 3.3 64-bit on 64-bit windows 7 with the newest stable version of 7z.dll

I'd need the full stack trace to see where the actual error is occurring, RNOK as you can see raises an exception if if a function does not return the HRESULT S_OK, but it's used in many places in the code.

harvimt avatar Oct 01 '13 08:10 harvimt

I'd also like to emphasize that this software is very very beta.

harvimt avatar Oct 01 '13 08:10 harvimt

Thank you for the fast answer :-)

Complete Traceback:

Traceback (most recent call last): File "C:\7zipTest\start.py", line 11, in from lib7zip import * File "C:\7zipTest\lib\lib7zip__init__.py", line 92, in formats = get_format_info() File "C:\7zipTest\lib\lib7zip__init__.py", line 78, in get_format_info RNOK(dll7z.GetNumberOfFormats(num_formats)) File "C:\7zipTest\lib\lib7zip\winhelpers.py", line 20, in RNOK assert int(status) == S_OK AssertionError

LORDofDOOM avatar Oct 01 '13 21:10 LORDofDOOM

Hrm, I'll need more info about your platform (python version, 7z.dll version, windows version). I'll also probably need to add more exact error handling to my code knowing that GetNumberOfFormats returned an error isn't very useful compared with knowing which error code it returned, and then have you try again.

harvimt avatar Oct 01 '13 21:10 harvimt

I use Py 3.3 with 7-Zip 9.20 (stable). OS is Win 8.1 RTM x64

LORDofDOOM avatar Oct 06 '13 02:10 LORDofDOOM

hrm, same except windows 7, newest version should report which error code was given, and includes a small test suite (though it has 90% coverage, so hey).

New version requires the enum34 package and I added in dll autodetection (like it says in the README) so 7z.dll doesn't need to be in the current directory or path (it will find it from the registry)

harvimt avatar Oct 06 '13 05:10 harvimt