-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Get this error every time I try to import unrar:
Traceback (most recent call last):
File "D:/IdeaProjects/Python/Downloader/archive.py", line 6, in <module>
from unrar import rarfile
File "%LocalAppData%\Programs\Python\Python36\lib\site-packages\unrar\rarfile.py", line 26, in <module>
from unrar import unrarlib
File "%LocalAppData%\Programs\Python\Python36\lib\site-packages\unrar\unrarlib.py", line 45, in <module>
unrarlib = ctypes.WinDLL(lib_path)
File "%LocalAppData%\Programs\Python\Python36\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
What I've tried:
- Installing UnRAR via the exe found at https://www.rarlab.com/rar/UnRARDLL.exe and then adding the
C:\Program Files (x86)\UnrarDLLto the system PATH. Also tried settingUNRAR_LIB_PATHtoC:\Program Files (x86)\UnrarDLL,C:\Program Files (x86)\UnrarDLL\UnRAR.dll, etc. - Manually extracting UnRAR.dll from said exe and pointing
UNRAR_LIB_PATHto it. Tried the same also with UnRAR64.dll. - Renaming the installer exe to unrar.dll and adding it to PATH (lol i give up)
Edit: Just realised the last commit was in 2016. That was a waste of 2 hours.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels