[mythtv-users] Log output of user jobs via MythLog class?
Michael T. Dean
mtdean at thirdcontact.com
Mon May 12 01:44:13 UTC 2014
On 05/11/2014 05:47 PM, Nicolas Krzywinski wrote:
> Am 07.05.2014, 02:15 Uhr, schrieb Raymond Wagner:
>> On May 6, 2014, at 17:24, "Nicolas Krzywinski" wrote:
>>> Am 06.05.2014, 20:46 Uhr, schrieb Raymond Wagner:
>>>
>>>> It should work, but use of Unicode text in Python 2 is a never
>>>> ending source of fun. If you give me a trace back, I can take a
>>>> look at it.
>>> If you will tell me what to do, I will do it
>>
>> Run it from the terminal with the appropriate chanid and starttime.
>> It will print the backtrace to the terminal.
>>
> I don't know what happened ... I tried it from the command line and it
> worked. Next, from mythweb and it works as well now!
> One of the movies I now successfully exported was exactly the one that
> failed with "error: ascii" prior.
>
> I will watch this further.
AIUI, Python tries to guess the appropriate character set to use for
stdin/stdout/stderr based on the environment and in some cases--like
when called through a pipe or redirect or ... will go back to ASCII.
You can force it to use UTF-8 with something like:
PYTHONIOENCODING=utf-8 /path/to/myscript.py
https://docs.python.org/2/using/cmdline.html#envvar-PYTHONIOENCODING
Mike
More information about the mythtv-users
mailing list