MestreLion / legendastv

API for Legendas.TV website, world's largest repository of Brazilian Portuguese Movie/TV Series subtitles. Utilities to search, retrieve info, download, extract and match subtitles.
15 stars 3 forks source link

Crash when rar file contains non-ascii characters #13

Closed ratoaq2 closed 9 years ago

ratoaq2 commented 9 years ago

example:

"CSI S15E17 720p HDTV X264 DIMENSION"

2015-02-18 20:58:13,407 CRITICAL 'utf8' codec can't decode byte 0xa3 in position 2: invalid start byte Traceback (most recent call last): File "/home/osmc/legendastv/legendastv.py", line 139, in main(sys.argv[1:]) File "/home/osmc/legendastv/legendastv.py", line 115, in main subtitles.retrieve_subtitle_for_movie(filename, legendastv=ltv) File "/home/osmc/legendastv/legendastv/subtitles.py", line 262, in retrieve_subtitle_for_movie files = ft.extract_archive(archive, extlist=["srt"]) File "/home/osmc/legendastv/legendastv/filetools.py", line 254, in extractarchive for root, , files in os.walk(path): File "/usr/lib/python2.7/os.py", line 286, in walk if isdir(join(top, name)): File "/usr/lib/python2.7/posixpath.py", line 80, in join path += '/' + b UnicodeDecodeError: 'utf8' codec can't decode byte 0xa3 in position 2: invalid start byte

If it's not the proper fix, you should ignore it and close it.