[mythtv-users] Error in mythvidexport.py

Greg Thompson gthompson20 at gmail.com
Mon Mar 17 17:51:46 UTC 2014


On Mar 17, 2014, at 1:26 PM, Raymond Wagner <raymond at wagnerrp.com> wrote:

> On 3/17/2014 12:56 PM, Greg Thompson wrote:
>> gthompson at ubuntuserver:~/code$ ./mythvidexport.py --verbose all --chanid=2023 --starttime=20140317073000
>> 2014-03-17 12:54:04.506280 I [26551] Python Database Connection Attempting connection: sql://mythconverg@localhost:3306/
>> 2014-03-17 12:54:04.506388 I [26551] Python Database Connection Spawning new database connection
>> 2014-03-17 12:54:04.515301 I [26551] Python Database Connection Spawning new database connection
>> 2014-03-17 12:54:04.527219 I [26551] mythvidexport.py Using recording -- Wild Kratts - Kickin' It With the Roos
>> 2014-03-17 12:54:04.535951 I [26551] mythvidexport.py Performing TV export with local data.
>> 2014-03-17 12:54:04.537039 I [26551] Python MythVideo Grabber Running external command -- /usr/local/share/mythtv/metadata/Television/ttvdb.py -l en -D 216851 1 21
>> 2014-03-17 12:54:04.747256 I [26551] Python Backend Connection Connecting to backend [192.168.1.178]:6543
>> 2014-03-17 12:54:04.753913 I [26551] Python Backend Connection Successfully connected to backend -- [192.168.1.178]:6543
>> 2014-03-17 12:54:04.755081 I [26551] Python Backend Connection Terminating connection to [192.168.1.178]:6543
>> 2014-03-17 12:54:04.755423 I [26551] Python Backend Connection Terminating connection to [192.168.1.178]:6543
>> 2014-03-17 12:54:04.755543 I [26551] Python Backend Connection Connecting to backend [192.168.1.178]:6543
>> 2014-03-17 12:54:04.761451 I [26551] Python Backend Connection Successfully connected to backend -- [192.168.1.178]:6543
>> 2014-03-17 12:54:04.762367 I [26551] Python Backend Connection Connecting to backend [192.168.1.178]:6543
>> 2014-03-17 12:54:04.763154 I [26551] Python Backend Connection Successfully connected to backend -- [192.168.1.178]:6543
>> 2014-03-17 12:54:04.764236 I [26551] Python Backend Connection Terminating connection to [192.168.1.178]:6543
>> 2014-03-17 12:54:04.764586 I [26551] Python Backend Connection Connecting to backend [192.168.1.178]:6543
>> 2014-03-17 12:54:04.765581 I [26551] Python Backend Connection Successfully connected to backend -- [192.168.1.178]:6543
>> 2014-03-17 12:54:04.766874 I [26551] Python Backend Connection Terminating connection to [192.168.1.178]:6543
>> 2014-03-17 12:54:04.767389 I [26551] Python Backend Connection Connecting to backend [192.168.1.178]:6543
>> 2014-03-17 12:54:04.768480 I [26551] Python Backend Connection Successfully connected to backend -- [192.168.1.178]:6543
>> 2014-03-17 12:54:04.769500 I [26551] Python Backend Connection Terminating connection to [192.168.1.178]:6543
>> 2014-03-17 12:54:04.772966 I [26551] mythvidexport.py Import complete
>> 2014-03-17 12:54:04.773477 I [26551] mythvidexport.py Copying myth://Default@ubuntuserver/2023_20140317113000.mpg to myth://Videos@ubuntuserver/Television/Wild Kratts/Season 1/Wild Kratts - S1E21 - Kickin’ it with the Roos.mpg
>> 2014-03-17 12:54:04.775861 I [26551] Python File Transfer Opening local file (r) -- /mnt/data1/myth/default/2023_20140317113000.mpg
>> 2014-03-17 12:54:04.776341 I [26551] Python Backend Connection Connecting to backend [192.168.1.178]:6543
>> 2014-03-17 12:54:04.777221 I [26551] Python Backend Connection Successfully connected to backend -- [192.168.1.178]:6543
>> 2014-03-17 12:54:04.778469 I [26551] Python Backend Connection Terminating connection to [192.168.1.178]:6543
>> 2014-03-17 12:54:04.779190 I [26551] Python File Transfer Opening local file (w) -- /mnt/data1/myth/videos/Television/Wild Kratts/Season 1/Wild Kratts - S1E21 - Kickin’ it with the Roos.mpg
>> Traceback (most recent call last):
>>   File "./mythvidexport.py", line 435, in <module>
>>     main()
>>   File "./mythvidexport.py", line 407, in main
>>     export = VIDEO(opts)
>>   File "./mythvidexport.py", line 75, in __init__
>>     self.copy()
>>   File "./mythvidexport.py", line 234, in copy
>>     dstfp = self.vid.open('w', nooverwrite=True)
>>   File "/usr/local/lib/python2.7/dist-packages/MythTV/dataheap.py", line 968, in open
>>     mode, False, nooverwrite, self._db)
>>   File "/usr/local/lib/python2.7/dist-packages/MythTV/mythproto.py", line 294, in ftopen
>>     sg.dirname+filename)
>>   File "/usr/local/lib/python2.7/dist-packages/MythTV/logging.py", line 425, in __call__
>>     self.log(mask, level, message, detail)
>>   File "/usr/local/lib/python2.7/dist-packages/MythTV/logging.py", line 371, in log
>>     self._logdatabase(mask, level, message, detail)
>>   File "/usr/local/lib/python2.7/dist-packages/MythTV/logging.py", line 422, in _logdatabase
>>     message + (' -- {0}'.format(detail) if detail else '')))
>> UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 83: ordinal not in range(128)
> 
> Quick fix: Run the script with --nodblog.
> 
> Longer fix: The issue is actually in the Python bindings, not mythvidexport.py.  The logging interface in the Python bindings needs to be updated to ensure safety with unicode characters.
> 
> Side comment: Why the hell did someone decide to use a unicode right single quote, rather than just an ascii apostrophe?

I Know! Right? I thought the same thing.

> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Thanks for the quick response!

Greg



More information about the mythtv-users mailing list