mscore commandline usage

• May 6, 2018 - 12:08

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

In reply to 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 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 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 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.

Do you still have an unanswered question? Please log in first to post your question.