i'm using a code to decompress an archive coming from a blob storage and this code is already functional for another archive that has 300mb, but while trying to decompress another one bigger than this, i've got this error:
"NotImplementedError: That compression method is not supported"
The last lines of error console show this :
/usr/local/lib/python3.8/zipfile.py in _get_decompressor(compress_type)
718
719 def _get_decompressor(compress_type):
--> 720 _check_compression(compress_type)
721 if compress_type == ZIP_STORED:
722 return None
/usr/local/lib/python3.8/zipfile.py in _check_compression(compression)
698 "Compression requires the (missing) lzma module")
699 else:
--> 700 raise NotImplementedError("That compression method is not supported")
And i'm using this code to this:
# mother folder
files = dbutils.fs.ls(dl_path)
for fi in sorted(files, reverse=True):
zip_files = zipfile.ZipFile(f'/dbfs{dl_path}{fi.name}')
print(zip_files.namelist())
for f in zip_files.namelist():
zip_files.extract(f, str(extract_path).replace('dbfs:', '/dbfs'))
I dont know why in one of archives this one works but the other one dont. I assume it might be about size? So i'm thinking about do a try: first code and except a second one? Idk, some one has tips?