python-unrar
python-unrar copied to clipboard
Problems with RarFile read and open methods
My environment: python 3.8.5, on Windows 10 x64, unrar module 0.4
The unrar64.dll is installed on "c:\Program Files (x86)\UnrarDLL\x64", the environment variable UNRAR_LIB_PATH is set to C:\Program Files (x86)\UnrarDLL\x64\UnRAR64.dll.
The extract method works fine. I was not able to make read and open methods to work.
The following code works:
from unrar import rarfile
import glob
myFile = rarfile.RarFile("my_rar.rar")
rarList = myFile.namelist()
print (rarList)
myFile.extract(rarList[0])
However, using .open or .read methods does not work - as in myFile.open(rarList[0]) or myFile.read(rarList[0]). The commands does not complete (I was not able to find another word). It suspect it might be related to unrar64.dll library (DLL version: 6.22.1.865, signed on 2023-05-14) but I have no experience to debug it.
Same issue. Extract works fine, but open does not. I tried it with v6.24 and v5.90 of UnRAR64.dll and both fail. I recently upgraded to Windows 10 from Windows 7 where it worked fine. I did not update Python 3.8.1 in the meantime.
Not sure why this project here is dead when the owner has lots of activity on other repos.
In the meantime I tried https://github.com/markokr/rarfile which seems to be a good replacement. No real code changes needed - at least for my use cases.