Author Topic: tridscan: non ASCII file name -> UnicodeDecodeError: 'ascii' codec can't decode  (Read 3947 times)

jenderek

  • Sr. Member
  • ****
  • Posts: 375
Hello,

When i run tridscan on Time shift videos (*.TSV) i got sometimes
prosses messages like:
File(s) to scan found: 27
Scanning for patterns...
Checking file 1/27 '
...
Traceback (most recent call last):
  File "C:\progs\trid\tridscan.py", line 742, in <module>
    main()
  File "C:\progs\trid\tridscan.py", line 707, in main
    patterns = scanfiles_for_patterns(filenames, triddef.patterns)
  File "C:\progs\trid\tridscan.py", line 325, in scanfiles_for_patterns
    filename.encode(errors="replace"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xfc in position 49: ordinal not in range(128)
arte HD-Auf der Suche nach meinem verlorenen Gl?ck(25062017_235910).TSV

The recorded videos have file names like TV_channelFilm_title(Date).TSV. So in German
TV films some times title contains umlaut characters ( see "?" in word "Gl?ck"
or "?" in "K?ln" for city cologne). When i rename video to something like:
arte HD-Auf der Suche nach meinem verlorenen Glueck(25062017_235910).TSV
tridscan run succeeds without any error. This work around helps, but it is
annoying to do this for new videos with non ASCII character in file names.

So it would be nice if this little bug concerning UTF character handling could
be fixed in in future version of tridscan.

Thanks
J?rg Jenderek

Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2743
    • Mark0's Home Page
Sorry, forgot about this post.
I'll surely take a look at this and hopeful fix it in a next release, thanks!