Transfer databases between computers is ok, but not linked audio

edited December 2013 in Troubleshooting
Hi, I've been using OpenLP for quite a while, successfully working with automated cloud-based sync between main PC at home, and laptop that I use in church.  The data folder (and subfolders), and service plan folders (in My Documents) sync automatically, and all works well each week without fail.  However, I've just started to use linked audio, and although I can link an audio file on either PC or laptop to a song, and have it play automatically, the problem comes when the service plan or data files are sync'd.  After syncing, the song audio does not play at all (seems inaccessible) and modifying and saving the service plan results in a warning window. 

The paths to the data folders are different in both computers - could that be a problem?
C:\Users\John Duffy\AppData\Roaming\openlp\data\

Is there any way round this, as it would be good to be able to sync files and also keep the linked audio working?


  • Yes, the reason why this occurs is indeed because the paths are different.

    Currently, the full file path for audio files is stored in the database. If the audio file isn't in the expected location (eg because the expected location was under the user profile 'John Duffy' and not 'John') then it won't play.

    To keep linked audio you need to have the same path on the synced location.

    But I also think it would be good if OpenLP would store audio files under the Data folder as relative rather then hardcoded to a full file path.

  • Thanks for that explanation David.

    I wonder if it is possible to change a Windows 7 user path without causing Windows to crash, either by changing the user name or by redirecting the path.  I'll look into this more.

    But I agree, it would be good if OpenLP were to use relative paths rather than absolute path to the file.
  • This is a known bug, I thought we'd fixed the bug in 2.0.3, but I might be mistaken.
  • Hi raoul, I just tried it again, and it is still a problem, and I'm using 2.0.3 on both computers. 

    It's good to know that you've been working on this.  Thanks.

    Here's the error log when I tried to save a song with linked audio on another computer, without making any changes to the song, with the linked audio tab highlighted:

    Traceback (most recent call last):

    File "D:\OpenLP_Code\2.0\build\pyi.win32\OpenLP\out00-PYZ.pyz\openlp.plugins.songs.forms.editsongform", line 847, in accept

    File "D:\OpenLP_Code\2.0\build\pyi.win32\OpenLP\out00-PYZ.pyz\openlp.plugins.songs.forms.editsongform", line 925, in saveSong

    File "D:\OpenLP_Code\2.0\build\pyi.win32\OpenLP\out00-PYZ.pyz\shutil", line 82, in copyfile

    IOError: [Errno 2] No such file or directory: u'C:\\Users\\John Duffy\\AppData\\Roaming\\openlp\\data\\songs\\audio\\473\\04 Great Is The Darkness.mp3'

  • @batmanjd you can set the location of the data folder on the advanced settings tab. Change this to something like c:\openlp for both systems and that should solve your issue!
  • Great phill, thanks for that tip.  I'll try that.
  • That still means the path is hard-coded. I do think it would be better for the location of the saved audio to be relative to the Data folder.

    For this reason I'm using the PortableApps version and make sure it is installed to our systems to the exact same path.

  • edited December 2013
    This is one major issue I have with OpenLP at the moment. Although the software is cross platform because it's written in python, this issue effectively makes the software NOT cross platform. 

    dkummerow is spot on; the "path is hard-coded. I think it would be better for the location of the saved audio to be relative to the Data folder." That's the nub of the problem. It makes, even sharing services between different windows/mac/linux pc's problematic.  Setting the location of the data folder to be the same on both pcs only solves the problem if both pcs run the same operating system.

    I've had to change the way I prepare a service for our sunday morning service. I used to prepare on Ubuntu (& present on Windows 7), but I have had to change to using Windows 7 (using the same user name), in order to work around this issue. 
  • I expect that this is something that will be resolved soon, as raoul helpfully notes that he thought that it had already been done.  I look forward to that, but in the meantime phill's workaround solves the problem, for me at least.
  • I'm sorry you're feeling quite upset about it, dfear. Unfortunately this is the case with cross-platform software that is truly cross-platform in the way OpenLP is. We have to continually make sure things work in circumstances they wouldn't normally, and things drop through the cracks.

    We are actively trying to make things like this less likely, and the version that is currently in development is gaining a comprehensive suite of unit tests which ensures that we don't have issues like this in future.

    Having said all of this, try this exact same thing on some of the commercial products and I'll guarantee you that it won't work at all.
  • The problem is with linked media (not just audio). I think changes to the service file (.osz) could partially or wholly solved this issue.

    At present the service file is an archive which contains a copy of any media files (linked or unlinked) and an xml file file which lists the service items and where to find media items.

    The problem is that media files are stored in the service file (archive), and referenced in the xml file, as full paths. That's fine if we use same "data path" on both computers and run the same operating system.

    The solution to the problem would to change from using absolute paths (when referencing/storing media files in the service file) to relative paths (i.e relative to the "data path").

    Openlp is only cross platform when you don't have media items or linked audio in your service file.

  • I hope I don't come across as overly picky or nagging, I do think that openlp is a fantastic program and can only get better.
  • I am having the same cross platform issues, i.e., PC to Mac Or Mac To PC. Since Mac OS and Windows use very different Path specifications, changing the the data path does not help (at leats in my case), unless I re-link everything manually, which is not help at all.

    OpenLP is a great software and a blessing for small churches with very tight budgets. God bless everyone involved in this project, and may the lord guide you in making it an en even better application.

  • I put in a similar request in January 2013 regarding the absolute address of the music files in the database.

    Perhaps that could be updated to a bug rather than wishlist

  • Hi Raoul, thanks for working on that.  However, I'm using the full version on both PC and laptop, not the portable, so I don't think that that would work for me if I installed it. Correct me if I'm wrong.
  • It's just a test build. Run it, try to open one of your services files that usually has the issue, and then see if the test build still contains the issue.
  • batmanjd, as far as I know the only diffrence between the full install and the portable edition is that the portable edtion doesn't write anything into the windows registry (full does) and in the full version you have to choose an absolute path for the data folder.

    The functions and errors should be the same in both versions. Am I right, raoul?
  • So, can I install this in another location and it won't interfere with the existing installation?  Or what would be the impact of installing this one over the top of the exsting installation, and then installing the latest update over the top of this one?
  • edited April 2014
    batmanjd, a portable installation doesn't change anything on your system. It will only create a new folder. From there you can start und test the portable edition. If you delete that folder afterwards the "installation" is gone.
  • edited April 2014
    Hi raoul,

    Thanks for posting the test version.

    When transferring a database, the audio only works if the path names are the same. This is because path names are hard-coded in songs.sqlite rather than relative paths.

    What is now working is when a database is transferred by copying all songs into a new service file, saving, and then opening this service file on the other machine. Audio is now copied correctly to the audio folder.

    Hope this helps, and thanks again for your hard work.

  • Hope this helps.

    I have recently transferred data from XP to Win 8.1, and encountered the same problem.  I have tried:
    1. Adding the music file again to correct the path
    2. Finding the location of the music file in C:\Users\Username\AppData\Roaming\openlp\data\songs\audio  and deleting the music file and the containing folder and then restarting OpenLP, and re-adding the music file.
    3. Deleting the whole entry - words and music as specified above, and adding the whole thing back again from scratch

    None of these options consistently result in the music being added to the words, and allowing me to play the music when the words come up.

    This is a real shame as when it works it is so helpful.

    Are there any other ideas?

Sign In or Register to comment.