[mythtv-users] mythvidexport.py failing on one episode -- still the non-ascii bug?

Jim lists at morton.hrcoxmail.com
Thu May 17 18:45:34 UTC 2018


On 5/17/2018 1:25 PM, Ian Evans wrote:
> On Wed, May 16, 2018 at 5:21 PM, Ian Evans <dheianevans at gmail.com 
> <mailto:dheianevans at gmail.com>> wrote:
>
>     On Wed, May 16, 2018 at 4:46 PM, Nicolas Krzywinski
>     <myth2 at site7even.de <mailto:myth2 at site7even.de>> wrote:
>
>         Am 15.05.2018 um 23:47 schrieb Ian Evans:
>>
>>         UnicodeEncodeError: 'ascii' codec can't encode character
>>         u'\xf1' in position 105: ordinal not in range(128)
>>         2018-05-15 17:40:41.217882 D [23968] Python Database
>>         Connection database callback received -- 0x7f4c75b3e628
>>         2018-05-15 17:40:41.218213 D [23968] Python Database
>>         Connection Releasing connection to pool
>>
>>         Looking at github I see the script hasn't been updated in a
>>         few years. It's a great script but I don't know python.
>>         Anyway to patch it or should I just shrug and temporarily
>>         change the "Piñata" to "Pinata" and change it back after the
>>         export?
>>
>>         Thanks.
>         Did you tried setting utf8 charset like this?
>
>         PYTHONIOENCODING=utf-8 python /srv/bin/mythvidexport.py
>         --skiplist --listingonly --delete %JOBID%
>
>
>
>     Took your suggestion and added PYTHONIOENCODING=utf-8 to the start
>     of the command line. Got the same result at the end of the logging:
>
>     "UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1'
>     i"n position 105: ordinal not in range(128)"
>
>
> A question about the error line about the ascii codec: is it being 
> thrown by is the error in line 428 of 
> /usr/lib/python2.7/dist-packages/MythTV/logging.py which is:
>
> message + (' -- {0}'.format(detail) if detail else '')))
>
Assuming you meant 128 and not 428...
105 is the position of the character at issue. 128 is the range of ASCII 
characters (0-127) that the accented character is outside of.

-- 
Jim


More information about the mythtv-users mailing list