Rarfile error: RarCannotExec: Cannot find working tool

error RarCannotExec: Cannot find working tool
try run app on Community Cloud (https://cbr-f123.streamlit.app/cbr_f123)
can’t extract files from RAR arhive.
please help.
is there any solution?
same code (rarfile) works perfect on google colab

1 Like

Hi @kapam

There are code snippets that you can look into from rarfile API Docs:


This is the first snippet:

import rarfile

rf = rarfile.RarFile("myarchive.rar")
for f in rf.infolist():
    print(f.filename, f.file_size)
    if f.filename == "README":

Hope this helps!

1 Like

problem is not in Rarfile - it works well.
The problem is that Comminity Cloud doesn’t support Unrar (which uses Rarfile).
And to support it, Unrar should be installed not via pip (i.e. specified in requirements) but via apt install rar.
Any ideas how can i do it?

1 Like

find solution in manuals))

Put the binary dependencies in packages.txt

created file ‘packages.txt’ and wrote this row into:

rebooted app and it worked!)


Glad you’ve found the solution, Yes exactly, installing Ubuntu packages can be specified in packages.txt.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.