I'm trying to extract a rar file using the python library rarfile.RarFile (on windows), but it keeps giving me
TypeError: 'NoneType' object is not iterable
import rarfile
rarfile=r"E:\rarFiles\CH6ED-(09_14_2021 Tue-10_10_33.99).rar"
with rarfile.RarFile(rarfile) as file:
file.extractall(path="directory",pwd="password")
can anyone please help me get rid of with this error?
I changed my code to this
import rarfile
with rarfile.RarFile(r"E:\rarFiles\CH6ED-(09_14_2021 Tue-10_10_33.99).rar") as file:
file.extractall(path="C:\Users\Joanna\Desktop",pwd="123")
but I gave me the same error
rarfilepip install rarfileand just pasted in your 3 lines, I getrarfile.RarCannotExec: Cannot find working tool(seems related to stackoverflow.com/a/43527756/114900 ).