0

When do unpack with shutil, Errno 22 pop up. Some files cannot unpack is OK, but how could files left to be unpacked? Or how could do unpack with errors ignored?

try :
    shutil.unpack_archive(file, thirdFolder)
except OSError as error :
    print(error)

[Errno 22] Invalid argument: 'D:\099Logs\HOUJI-10077--UnzipUn7z\bugreport-2023-08-04-141558\bugreport-houji-2023-08-04-141739\lshal-debug\android.frameworks.cameraservice.service@2.0::ICameraService_default.txt'

Fukai
  • 361
  • 1
  • 3
  • 9
  • Does this answer your question? [OSError \[Errno 22\] invalid argument when use open() in Python](https://stackoverflow.com/questions/25584124/oserror-errno-22-invalid-argument-when-use-open-in-python) – richyen Aug 10 '23 at 06:52
  • There are many files in the .zip file. Some are unpacked sucessfully. And this CameraService_default.txt cannot be unpacked. How could I treat this file when files has not been unpacked? – Fukai Aug 10 '23 at 07:51

0 Answers0