Opened 7 years ago

Closed 7 years ago

#9637 closed Bug Report - General (fixed)

Jamu.py crashes - unable to decode unicode

Reported by: troy@… Owned by: robertm
Priority: minor Milestone: 0.24.1
Component: Plugin - MythVideo Version: 0.24-fixes
Severity: low Keywords: jamu.py mythvideo scripts
Cc: Ticket locked: no

Description (last modified by Raymond Wagner)

Jamu.py crashes with the following error:

troy@ebony:/usr/local/bin$ jamu -MVI
Traceback (most recent call last):
  File "/usr/local/bin/jamu", line 6420, in <module>
    main()
  File "/usr/local/bin/jamu", line 6388, in main
    configuration.setUseroptions(default_config)
  File "/usr/local/bin/jamu", line 1287, in setUseroptions
    self.config['ignore-directory'].append(unicode(cfg.get(section, option), 'utf8'))
TypeError: decoding Unicode is not supported

jamu.conf contains the following entries for ignore-directory:

[ignore-directory]
ignore01: /var/lib/mythtv/videos/Movies/.AppleDouble/
ignore02: /var/lib/mythtv/videos/Movies/Childrens/.AppleDouble/
ignore03: /var/lib/mythtv/videos/Series/.AppleDouble/
ignore04: /var/lib/mythtv/videos/Documentaries/.AppleDouble/
ignore05: .AppleDouble/
ignore08: Movies/.AppleDouble/

Removing the ignore-directory options stops the crash.

Alternatively altering line 1287 in jamu.py fixes the crash:

from:

                    self.config['ignore-directory'].append(unicode(cfg.get(section, option), 'utf8'))

to:

                    self.config['ignore-directory'].append(cfg.get(section, option))

Attachments (2)

version_info (692 bytes) - added by Raymond Wagner 7 years ago.
unicode_fix.patch (1.7 KB) - added by Kenni Lund [kenni a kelu dot dk] 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by Kenni Lund [kenni a kelu dot dk]

The regex entry also needs fixing: http://mythtv.pastebin.com/pHurujGD

I'm awaiting approval from Doug Vaughan, the author of Jamu, before comitting the above patch.

comment:2 Changed 7 years ago by Raymond Wagner

Description: modified (diff)

Changed 7 years ago by Raymond Wagner

Attachment: version_info added

Changed 7 years ago by Kenni Lund [kenni a kelu dot dk]

Attachment: unicode_fix.patch added

comment:3 Changed 7 years ago by Kenni Lund [kenni a kelu dot dk]

pastebin-copy of the patch expires today - patch attached to this ticket instead.

comment:4 Changed 7 years ago by Kenni Lund

Fix a bug which caused jamu to crash due to multiple unicode conversions.

Refs #9637.

Changeset: 454f85387c51cd71bd24f350083a1f90ad515be0

comment:5 Changed 7 years ago by Kenni Lund

Resolution: fixed
Status: newclosed

Fix a bug which caused jamu to crash due to multiple unicode conversions.

Fixes #9637. ACKed by Doug Vaughan.

Changeset: 464fa2837373d5f0c9277482a06bbb871369f7b7

Note: See TracTickets for help on using tickets.