Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character encoding error #64

Open
Zippy79 opened this issue Dec 11, 2020 · 1 comment
Open

Character encoding error #64

Zippy79 opened this issue Dec 11, 2020 · 1 comment

Comments

@Zippy79
Copy link

Zippy79 commented Dec 11, 2020

There seems to be a character encoding problem when using letters with diacritic marks in a filter:

kodi@kodi:~$ ./texturecache.py C artists "Sinéad O'Connor"

Caching artwork: 0 items remaining of 2 (qs: 0, qm: 0), 0 errors, 0 threads active (02.00 downloads per second, ETA: 00:00:00)

Traceback (most recent call last):
  File "./texturecache.py", line 8663, in <module>
    main(sys.argv[1:])
  File "./texturecache.py", line 8470, in main
    if _stats: TOTALS.libraryStats(multi=_multi_call, filter=_filter, lastRun=_lastRun, query=_query)
  File "./texturecache.py", line 3736, in libraryStats
    print(line0)
  File "/usr/lib/python2.7/codecs.py", line 369, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 63: ordinal not in range(128)

Omit the diacritic mark from the filter and it works correctly:

kodi@kodi:~$ ./texturecache.py C artists "O'Connor"

Caching artwork: 0 items remaining of 2 (qs: 0, qm: 0), 0 errors, 0 threads active (02.00 downloads per second, ETA: 00:00:00)

Cache pre-load activity summary for "artists", filtered by "O'Connor":

              |    fanart   |  thumbnail  |    TOTAL
--------------+-------------+-------------+-------------
Cached        |      1      |      1      |      2
Deleted       |      1      |      1      |      2
Duplicate     |      -      |      -      |      0
Error         |      -      |      -      |      0
Ignored       |      -      |      -      |      0
Skipped       |      -      |      -      |      0
Undefined     |      -      |      -      |      0
========================================================
TOTAL         |      2      |      2      |      4
Download Time | 00:00:00.28 | 00:00:00.31 | 00:00:00.31

  Threads Used: 2
   Min/Avg/Max: 02.00 / 06.29 / 02.00 downloads per second
   Min/Avg/Max: 00.29 / 00.30 / 00.32 seconds per download

       Loading: 00:00:00.03
       Parsing: 00:00:00.00
     Comparing: 00:00:00.17
   Downloading: 00:00:00.31
 TOTAL RUNTIME: 00:00:00.52
@hugepants
Copy link

hugepants commented Jan 28, 2021

Try using Python 3+ instead of 2.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants