Hi,
We develop an open source app called WorshipSongs (Ref: https://github.com/mcruncher/worshipsongs-ios).
This app has a feature where users can create a list of their favourite songs.
As some of our users also use OpenLP, we are working on a new feature to export this favourite list in OpenLP 2.4.6 service format, to be very specific, OpenLP Lite service format.
The reason for choosing OpenLP 2.4.6 service format is because that's the publicly available OpenLP version as of now.
We studied the format of the service_data JSON and created a JSON file accordingly in "utf8" encoding.
When we zipped this file with an extension oszl and import it in OpenLP 2.4.6, we got the following error:
Traceback (most recent call last):
File "openlp/core/ui/servicemanager.py", line 440, in on_load_service_clicked
File "openlp/core/ui/servicemanager.py", line 755, in load_file
File "json/__init__.py", line 265, in load
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/encodings/ascii.py", line 26, in decode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 1208: ordinal not in range(128)
I observed that the service_data json files created by OpenLP 2.4.6 has the encoding "us-ascii".
Does the Service Importer support encodings other than "us-ascii"?
I've attached a service file generated by the WorshipSongs app for your reference. I've added the extension "zip" so that I can upload it here.
Comments
It looks like the service_data.osj file should be in "us-ascii" encoding.
When I made that change, the file was imported as expected.
@sskjames hrm, thanks for letting us know. Really, the file should be in UTF-8 encoding. I'm going to create an issue in GitLab and see if we can get that sorted out in the beta version of OpenLP.