Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#5005 closed patch (fixed)

burning fail with UnicodeEncodeError on non ascii titles

Reported by: fsc@… Owned by: paulh
Priority: minor Milestone: unknown
Component: mytharchive Version: 0.21-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Hi,

As said on Mythbuntu forumhttp://ubuntuforums.org/showthread.php?t=729072, i upgraded to mythtv 0.21 on march 11 (Mythbuntu 7.10 proposed update). Since then, i couldn"t burn DVD with mytharchive if an european accent appears in the title (or description?).with en error like --- File "/usr/share/mythtv/mytharchive/scripts/mythburn.py ", line 5400 in paiun processJob(job), [...] line 5196 in processJob BurnDVDISO(title) [...] line 2587 in BurnDVDISO write(command) [...] line 242 in write sys.stdout.write(text+"\n") UnicodeEncodeError?: 'ascii' codec can't encode character u'\xe0' in position 61: ordinal not in range(12 --- It's not a cut-and-paste, but i can't find the good logfile...

I'm discovering python, so i went to the sources, (/usr/share/mythtv/mytharchive/scripts/mythburn.py ) and change line 5196 with : BurnDVDISO(title.encode("utf-8")) (i added the <<.encode("utf-8")>> part)

I don't know it it's an awful hack or a good way to solve the problem, i have no "full view" of the source. It's worked for me, and until now...

I didn't found a forum, so i opened a ticket. If it's "bad", i guess i'll be rejected :-) It seems it was discussed there http://svn.mythtv.org/trac/ticket/2818

Change History (3)

comment:1 Changed 12 years ago by teet.niin@…

It helped on my case(many recordings include üõöä... letters). I've changed also 5192 line(it helps on ISO case). Small output from changed file:

#Create the DVD ISO image if docreateiso == True or mediatype == FILE:

L5192 CreateDVDISO(title.encode("utf-8"))

#Burn the DVD ISO image if doburn == True and mediatype != FILE:

L5196 BurnDVDISO(title.encode("utf-8"))

It would be nice if this fix got into 0.21 fixes or 0.21.1(or someone comes up with some better working solution).

comment:2 Changed 12 years ago by paulh

Resolution: fixed
Status: newclosed

(In [16782]) A couple of MythArchive? fixes.

  • Fix creating a DVD when the first title, which is used to create the DVD's volumeid, has non ascii characters in it.
  • Fix comment not terminated error from dvdauthor caused by titles with a double '-' character in the title.

Fixes #4987, #4908, #5005.

comment:3 Changed 12 years ago by paulh

(In [16783]) Merge r16782 from trunk :-

A couple of MythArchive? fixes.

  • Fix creating a DVD when the first title, which is used to create the DVD's volumeid, has non ascii characters in it.
  • Fix comment not terminated error from dvdauthor caused by titles with a double '-' character in the title.

Refs #4987, #4908, #5005.

Note: See TracTickets for help on using tickets.