Opened 8 years ago

Closed 8 years ago

#10127 closed Bug Report - Hang/Deadlock (fixed)

mirobridge fails if there are graphics files with non ascii characters in storagegroups

Reported by: ryan.goat@… Owned by: sphery
Priority: minor Milestone: 0.25
Component: Contributed Scripts & Apps Version: Master Head
Severity: medium Keywords: miro mirobridge
Cc: Ticket locked: no

Description

Mirobridge stopped working for me several months ago. It seems to be failing because of non-ascii characters in mythtvideo graphics files for non-miro related videos.

Here is the error message. . .

2011-10-26 20:57:46,027 INFO     No items downloading
Traceback (most recent call last):
  File "./mythtv_git/mythtv/mythtv/contrib/imports/mirobridge/mirobridge.py", line 2729, in <module>
    main()
  File "./mythtv_git/mythtv/mythtv/contrib/imports/mirobridge/mirobridge.py", line 2392, in main
    videostodelete = getOldrecordedOrphans()
  File "./mythtv_git/mythtv/mythtv/contrib/imports/mirobridge/mirobridge.py", line 1191, in getOldrecordedOrphans
    data[u'subtitle'], graphic_suffix[u'episodeimagedir'], u'png'))
  File "/home/ryan/mythtv_git/mythtv/mythtv/contrib/imports/mirobridge/mirobridge/metadata.py", line 228, in cleanupVideoAndGraphics
    if name.startswith(fileBaseName):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 3: ordinal not in range(128)

Unicode byte 0xe9 is character: é. I have several graphic files with names like, "Pokémon Season 1_coverart.jpg". So it seems mirobridge seeing those files is the root cause behind the hang.

Everytime I run mirobridge it reaches this error and hangs. <ctrl-c> does not terminate the process. I have to do a "kill -9" command on the offending process.

Attachments (1)

mirofail.log (3.3 KB) - added by ryan.goat@… 8 years ago.
log showing mirobridge.py hanging

Download all attachments as: .zip

Change History (4)

comment:1 Changed 8 years ago by Raymond Wagner

Status: newinfoneeded_new

This sounds awfully like the kind of problem that arises from running something other than a UTF locale. Run the command locale from within the same environment that mirobridge operates under, and paste the result.

Changed 8 years ago by ryan.goat@…

Attachment: mirofail.log added

log showing mirobridge.py hanging

comment:2 in reply to:  1 Changed 8 years ago by ryan.goat@…

Output from locale:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

and I'm attaching a file showing the full output from locale & mirobridge.py in the same session.

comment:3 Changed 8 years ago by Github

Milestone: unknown0.25
Resolution: fixed
Status: infoneeded_newclosed

Fix unicode fault when dealing with file names

Correct a fault found when dealing with unicode filenames where the incorrect character set is used and string matching fails.

Fixes #10127

Signed-off-by: Raymond Wagner <rwagner@…>

Branch: master Changeset: de3efcfb54d383761197e5f8f6c5c3b3dc866e9b

Note: See TracTickets for help on using tickets.