rarfile gives BadRarFile: Failed the read enough data error

Viewed 1511

I am trying to open a rar file and read csv from it. It gives the error in the title. I copied unrar.exe to Windows' Path, so passed that setup_tools issue, but now having this one.

I can open the rar file and see what is inside. Only problem is when I try to read it.

with rarfile.RarFile(self.rarpath) as rf:
    with rf.open(stock_path) as f:
        print(f.readline())

How to fix this problem?

0 Answers
Related