Вот соответствующая часть моего кода:
Вот соответствующая часть моего кода: р>
Код: Выделить всё
if filename.endswith((".zip", ".rar")):
logging.info(f"Extracting archive file: {filename}")
extracted_path = os.path.join(download_path, extracted_folder)
try:
if filename.endswith(".rar"):
try:
patoolib.extract_archive(save_path, outdir=os.path.join(download_path, extracted_folder))
except Exception as e:
logging.error(f"Failed to extract {filename} using patoolib: {str(e)}")
Код: Выделить всё
2024-10-02 19:07:56,798 - Extracting archive file: 3.rar
2024-10-02 19:07:56,798 - Extracting ./3.rar ...
2024-10-02 19:07:56,940 - ... creating output directory `./extracted_files'.
2024-10-02 19:07:56,940 - running /nix/store/jfzqx3zrabqsnpy3vrclq453g2rdrmna-unrar-6.2.5/bin/unrar x -- /home/runner/1cb7a3be-726e-4988-9c2b-51f198e7db28/3.rar
2024-10-02 19:07:56,940 - with cwd='./extracted_files', input=''**
2024-10-02 19:07:56,957 - Failed to extract 3.rar using patoolib:Command `['/nix/store/jfzqx3zrabqsnpy3vrclq453g2rdrmna-unrar-6.2.5/bin/unrar', 'x', '--', '/home/runner/1cb7a3be-726e-4988-9c2b-51f198e7db28/3.rar']' returned non-zero exit status
Подробнее здесь: https://stackoverflow.com/questions/790 ... nvironment