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

Nicolas Krzywinski myth2 at site7even.de
Wed May 16 20:46:25 UTC 2018


Am 15.05.2018 um 23:47 schrieb Ian Evans:
> On Tue, May 15, 2018 at 5:03 PM, Bill Meek <keemllib at gmail.com 
> <mailto:keemllib at gmail.com>> wrote:
>
>     On 05/15/2018 11:41 AM, Ian Evans wrote:
>
>         since we're running it from the command line, we won't have a
>         jobid so I
>         followed the mythvidexport wiki and used chanid and starttime. In
>         recordedprogram the chanid is 1091 and the starttime is
>         2011-08-23 23:30:00
>         which I assume I change to 20110823233000
>
>
>     Works if I subtract my standard UTC offset from the stored time, not
>     my DST offset.
>
>     -- 
>     Bill
>
>
> Yep, adjusting the time got it to run and yes, it's a problem with an 
> accented character in the episode title "The Panty Piñata Polarization":
>
> 2018-05-15 17:40:41.156820 I [23968] Python File Transfer Opening 
> local file (w) -- /var/lib/mythtv/videos/Television/The Big Bang 
> Theory/Season 2/The Big Bang Theory - S2E07 - The Panty Piñata 
> Polarization.mpg
> 2018-05-15 17:40:41.157089 D [23968] Python Database Connection 
> Acquiring connection from pool
> Traceback (most recent call last):
>   File "/usr/share/mythtv/mythvidexport.py", line 437, in <module>
>     main()
>   File "/usr/share/mythtv/mythvidexport.py", line 409, in main
>     export = VIDEO(opts)
>   File "/usr/share/mythtv/mythvidexport.py", line 77, in __init__
>     self.copy()
>   File "/usr/share/mythtv/mythvidexport.py", line 236, in copy
>     dstfp = self.vid.open('w', nooverwrite=True)
>   File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line 
> 980, in open
>     mode, False, nooverwrite, self._db)
>   File "/usr/lib/python2.7/dist-packages/MythTV/mythproto.py", line 
> 297, in ftopen
>     sg.dirname+filename)
>   File "/usr/lib/python2.7/dist-packages/MythTV/logging.py", line 431, 
> in __call__
>     self.log(mask, level, message, detail)
>   File "/usr/lib/python2.7/dist-packages/MythTV/logging.py", line 377, 
> in log
>     self._logdatabase(mask, level, message, detail)
>   File "/usr/lib/python2.7/dist-packages/MythTV/logging.py", line 428, 
> in _logdatabase
>     message + (' -- {0}'.format(detail) if detail else '')))
> 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%

-- 
Nicolas

MythTV fixes/0.27 [v0.27.4-30-g3b43903]
Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-45-generic x86_64)
Digital Devices GmbH Octopus DVB Adapter via ddbridge kernel module
15c2:0036 SoundGraph Inc. LC16M VFD Display/IR Receiver (imon) via LIRC/devinput
Intel Corporation Core Processor Integrated Graphics Controller (rev 12)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180516/979bd418/attachment.html>


More information about the mythtv-users mailing list