<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 17, 2018 at 2:45 PM, Jim <span dir="ltr"><<a href="mailto:lists@morton.hrcoxmail.com" target="_blank">lists@morton.hrcoxmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 5/17/2018 1:25 PM, Ian Evans wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Wed, May 16, 2018 at 5:21 PM, Ian Evans <<a href="mailto:dheianevans@gmail.com" target="_blank">dheianevans@gmail.com</a> <mailto:<a href="mailto:dheianevans@gmail.com" target="_blank">dheianevans@gmail.com</a>><wbr>> wrote:<br>
<br>
    On Wed, May 16, 2018 at 4:46 PM, Nicolas Krzywinski<br></span><span class="">
    <<a href="mailto:myth2@site7even.de" target="_blank">myth2@site7even.de</a> <mailto:<a href="mailto:myth2@site7even.de" target="_blank">myth2@site7even.de</a>>> wrote:<br>
<br>
        Am 15.05.2018 um 23:47 schrieb Ian Evans:<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
        UnicodeEncodeError: 'ascii' codec can't encode character<br>
        u'\xf1' in position 105: ordinal not in range(128)<br>
        2018-05-15 17:40:41.217882 D [23968] Python Database<br>
        Connection database callback received -- 0x7f4c75b3e628<br>
        2018-05-15 17:40:41.218213 D [23968] Python Database<br>
        Connection Releasing connection to pool<br>
<br>
        Looking at github I see the script hasn't been updated in a<br>
        few years. It's a great script but I don't know python.<br>
        Anyway to patch it or should I just shrug and temporarily<br>
        change the "Piñata" to "Pinata" and change it back after the<br>
        export?<br>
<br>
        Thanks.<br>
</blockquote>
        Did you tried setting utf8 charset like this?<br>
<br>
        PYTHONIOENCODING=utf-8 python /srv/bin/mythvidexport.py<br>
        --skiplist --listingonly --delete %JOBID%<br>
<br>
<br>
<br>
    Took your suggestion and added PYTHONIOENCODING=utf-8 to the start<br>
    of the command line. Got the same result at the end of the logging:<br>
<br>
    "UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1'<br>
    i"n position 105: ordinal not in range(128)"<br>
<br>
<br>
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-packag<wbr>es/MythTV/logging.py which is:<br>
<br>
message + (' -- {0}'.format(detail) if detail else '')))<br>
<br>
</span></blockquote>
Assuming you meant 128 and not 428...<br>
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.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Jim</font></span><div class="HOEnZb"><div class="h5"><br>
</div><div class="h5"><br></div></div></blockquote><div><br></div><div>No, I DID mean line 428 of logging.py as seen in the trace. Just curious is that's the line that's causing the character in position 105 to trigger the error. Forgot to include the line in my last message:</div><div><br></div><div><br></div><div>

<blockquote type="cite" style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>File "/usr/lib/python2.7/dist-packa<wbr>ges/MythTV/logging.py", line 428, in _logdatabase</div><div>    message + (' -- {0}'.format(detail) if detail else '')))</div><div>UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 105: ordinal not in range(128)</div></div></div></div></blockquote>

For completeness in the thread, here's the full traceback:</div><div><br></div><div>

<blockquote type="cite" style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>2018-05-15 17:40:41.157089 D [23968] Python Database Connection Acquiring connection from pool</div><div>Traceback (most recent call last):</div><div>  File "/usr/share/mythtv/mythvidexpo<wbr>rt.py", line 437, in <module></div><div>    main()</div><div>  File "/usr/share/mythtv/mythvidexpo<wbr>rt.py", line 409, in main</div><div>    export = VIDEO(opts)</div><div>  File "/usr/share/mythtv/mythvidexpo<wbr>rt.py", line 77, in __init__</div><div>    self.copy()</div><div>  File "/usr/share/mythtv/mythvidexpo<wbr>rt.py", line 236, in copy</div><div>    dstfp = self.vid.open('w', nooverwrite=True)</div><div>  File "/usr/lib/python2.7/dist-packa<wbr>ges/MythTV/dataheap.py", line 980, in open</div><div>    mode, False, nooverwrite, self._db)</div><div>  File "/usr/lib/python2.7/dist-packa<wbr>ges/MythTV/mythproto.py", line 297, in ftopen</div><div>    sg.dirname+filename)</div><div>  File "/usr/lib/python2.7/dist-packa<wbr>ges/MythTV/logging.py", line 431, in __call__</div><div>    self.log(mask, level, message, detail)</div><div>  File "/usr/lib/python2.7/dist-packa<wbr>ges/MythTV/logging.py", line 377, in log</div><div>    self._logdatabase(mask, level, message, detail)</div><div>  File "/usr/lib/python2.7/dist-packa<wbr>ges/MythTV/logging.py", line 428, in _logdatabase</div><div>    message + (' -- {0}'.format(detail) if detail else '')))</div><div>UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 105: ordinal not in range(128)</div><div>2018-05-15 17:40:41.217882 D [23968] Python Database Connection database callback received -- 0x7f4c75b3e628</div><div>2018-05-15 17:40:41.218213 D [23968] Python Database Connection Releasing connection to pool</div></div></div></div></blockquote>

<br></div><div> </div></div><br></div></div>