mscore commandline usage
I am using MuseScore frequently in a terminal on the commandline (Linux Fedora 28) to convert files, sometimes in a shell script.
For example
mscore -o example.pdf example.mscz
would convert the musescore file "example.mscz" to a PDF file with the name "example.pdf" without the need to start the complete Musescore GUI.
But this stopped working. I am getting this error message:
QFSFileEngine::open: No file name specified
Has something changed? Bug?
Comments
I'm not aware on any changes there, on fact I've just used it 2 days ago on Windows and with a self build 2.3 development version
Which version of MuseScore? Is it installed, or are you using an AppImage?
In reply to Which version of MuseScore? … by Marc Sabatella
I am using Mscore 2.2.1 right now.
I installed it from the Fedora 28 package manager. But I also tried the AppImage from the Musescore website. Both give me the same error.
Also if I simply start Musescore from a terminal window, typing "mscore" I see the message
QFSFileEngine::open: No file name specified
But the program GUI will start and the program continues normally.
But when using the mscore command to convert files with the -o option on the commandline it does not work.
In reply to I am using Mscore 2.2.1… by m.tarenskeen
Maybe something has changed with some Qt component or library when I upgraded from Fedora 27 to Fedora 28 last week?
In reply to I am using Mscore 2.2.1… by m.tarenskeen
That "QFSFileEngine::open: No file name specified" seems not be the biggest problem.
Correction:
I did some more testing with the AppImage version and commandline file conversion seems to work perfectly. With the RPM version distributed from Fedora 28 it doesn't. I will also report this on Fedora Bugzilla and use the AppImage for now.
In reply to I am using Mscore 2.2.1… by m.tarenskeen
Do you, perchance, have a space in your filename and forgot to quote from the shell?
In reply to Do you, perchance, have a… by mirabilos
No, that wasn't the problem. I know how to use quotes or backslash escapes to deal with spaces in filenames on the linux commandline.
The problem was a MuseScore version incompatibility in the files I used fro testing. I found a fix/workaround using the -f / --force option. See my other post. Problem solved for now.
Updating my bugreport/question:
It now seems the error has another nature. This is what happens:
I was trying to convert a score, say "example-old.mscz" to a pdf on the commandline:
$ mscore example-old.mscz -o example-old.pdf
I am seeing this error message:
Cannot read file ROOT BEER RAG.mscz:
This score was saved using a newer version of MuseScore.
Visit the MuseScore website to obtain the latest version.
This is strange, because A: The score was saved with an older version of MuseScore and B: I am using the latest (stable) version of MuseScore.
Using the -f option overrides this error message and the conversion then succeeds. Bingo!
$ mscore -f example-old.mscz -o example-old.pdf
It's also possible to first update the old score to the new format using the -f option and then convert this updated version to pdf (or something else)
$ mscore -f example-old.mscz -o example-new.mscz
$ mscore example-new.mscz -o example-new.pdf
Problem solved. This just leaves this strange message that I'm seeing all the time but doesn' t seem to hurt:
QFSFileEngine::open: No file name specified
In reply to Updating my bugreport… by m.tarenskeen
The error message talks about an entirely different file, ROOT BEER RAG.mscz?
Whatever, it could have been last saved with a development build of the master branch. Open it and look at File/Score information, file format - and MuseScore version.
And that QFSFileEngine::open: No file name specified might be about an entirely different file, preferences, soundfont, style file etc. stuff MuseScore loads on startup.
In reply to The error message talks… by Jojo-Schmitz
About that ROOT BEER RAG filename: don't worry, just my copy/paste error when writing the comment.
I will check the file version. And I will check my file path preferences in MuseScore. You could be right.