EasyWorship import throws exception on unknown character

Bug #1553922 reported by Tomas Groth
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Committed
Tomas Groth
Fix Released
Tomas Groth

Bug Description

When importing from a EasyWorship DB the user selects an encoding to use for the imported text. If the importer encounters an unknown character it currently throws the exception shown below. This should be handled better, for example by creating an error entry in the import-log.
See https://support.openlp.org/scp/tickets.php?id=3332 for example files.

Traceback (most recent call last):
  File "/home/tgc/stuff/openlp/trunk/openlp/core/ui/wizard.py", line 216, in on_current_id_changed
  File "/home/tgc/stuff/openlp/trunk/openlp/plugins/songs/forms/songimportform.py", line 351, in perform_wizard
  File "/home/tgc/stuff/openlp/trunk/openlp/plugins/songs/lib/importers/easyworship.py", line 78, in do_import
  File "/home/tgc/stuff/openlp/trunk/openlp/plugins/songs/lib/importers/easyworship.py", line 303, in import_db
    self.copyright = copy.decode(self.encoding)
  File "/usr/lib/python3.4/encodings/cp1252.py", line 15, in decode
    return codecs.charmap_decode(input,errors,decoding_table)
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 45: character maps to <undefined>

Related branches

Tomas Groth (tomasgroth)
Changed in openlp:
assignee: nobody → Tomas Groth (tomasgroth)
status: Confirmed → In Progress
Tomas Groth (tomasgroth)
Changed in openlp:
milestone: none → 2.5.1
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers