Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 3 years ago

Closed 3 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 wagnerrp)

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 wagnerrp 3 years ago.
unicode_fix.patch (1.7 KB) - added by kenni 3 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 3 years ago by kenni

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 3 years ago by wagnerrp

  • Description modified (diff)

Changed 3 years ago by wagnerrp

Changed 3 years ago by kenni

comment:3 Changed 3 years ago by kenni

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

comment:4 Changed 3 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 3 years ago by Kenni Lund

  • Resolution set to fixed
  • Status changed from new to closed

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

Fixes #9637. ACKed by Doug Vaughan.

Changeset: 464fa2837373d5f0c9277482a06bbb871369f7b7

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.