You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is my code. It works fine without a password for rar, but gives an error when there is a password (the password is 100% correct). The problem is that when I create the rar myself and put a password, it works fine. However, it does not work with some rars that I downloaded from the internet with passwords.
Failed the read enough data: req=7661 got=0
This is my code. It works fine without a password for rar, but gives an error when there is a password (the password is 100% correct). The problem is that when I create the rar myself and put a password, it works fine. However, it does not work with some rars that I downloaded from the internet with passwords.
Failed the read enough data: req=7661 got=0
`
import rarfile
rar_dosyasi_yolu = "testrar.rar"
rarfile.UNRAR_TOOL = "UnRAR.exe"
rf = rarfile.RarFile(rar_dosyasi_yolu)
for info in rf.infolist():
print(f"File: {info.filename}, Size: {info.file_size} bytes")
if info.file_size > 0:
try:
with rf.open(info, pwd=b'testrar') as dosya:
icerik = dosya.read()
print(icerik)
except rarfile.RarWrongPassword:
print("Yanlış şifre!")
except rarfile.RarCRCError:
print("CRC hatası! Dosya bozuk olabilir.")
except Exception as e:
print(f"Dosya açılırken hata oluştu: {e}") # Failed the read enough data: req=7661 got=0
else:
print("Dosya boyutu 0, bu dosya boş olabilir.")
`
The text was updated successfully, but these errors were encountered: