manojmj92 / subtitle-downloader

Python script to automatically download subtitles for any movie/tv series episode.
GNU General Public License v3.0
776 stars 239 forks source link

Getting BadZipFile Exception while downloading the subtitle #43

Open RamolaWeb opened 7 years ago

RamolaWeb commented 7 years ago

When I was downloading the subtitle of the Serial , I was getting the error as follow due to which I was not able to download the subtitle. Error in fetching subtitle for /home/sahil/Movie/Breaking Bad/Season 2/Breaking.Bad.S02E02.BluRay.720p.x264.mkv Error (<class 'zipfile.BadZipFile'>, BadZipFile('File is not a zip file',), <traceback object at 0x7f7bab887c48>)

RamolaWeb commented 7 years ago

Then I just figure out the error by looking at the script and I figure out that the file created was not of the format of the zip and I also then change the code to as follow with zipfile.ZipFile(root2+".zip",mode="w") as subfile but then I was getting an error at the subfile.write(chunk) telling that the null character embedded in the Path. @mohanraj-r Please help to figure out.