chenqingyu / auto-sub

Automatically exported from code.google.com/p/auto-sub
0 stars 0 forks source link

scanDisk.py UnicodeDecodeError #157

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
scanDisk.py throws UnicodeDecodeError when there are unsupported characters in 
the filename.

I fixed it with these lines of code, but maybe it should be in more places too.

[...] line 39:
                    else:                                                                                                                
                        try:                                                                                                             
                            srtfile = os.path.splitext(filename)[0] + u".srt"                                                            
                        except UnicodeDecodeError, e:                                                                                    
                            log.error('Filename %s contains unsupported character' % filename)                                           
                            continue  

Original issue reported on code.google.com by replytos...@gmail.com on 26 Nov 2012 at 10:27

GoogleCodeExporter commented 9 years ago
Thanks for reporting, known issue. 

Original comment by romke.va...@gmail.com on 3 Dec 2012 at 8:17