MuseScore run from python on macOS 14.4.1 crashes on svg, png output

• Apr 18, 2024 - 11:29

MuseScore 4.2.1 is crashing when running from a python subprocess. Specifically

subprocess.run([muse_binary, "-f", "-o", png_file, tmp_midi])

where the muse_binary is set to

/Applications/MuseScore 4.app/Contents/MacOS/mscore

Throws this error, then crashes out:

qt.qpa.plugin: Could not find the Qt platform plugin "offscreen" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: cocoa.

qt.qpa.plugin: Could not find the Qt platform plugin "offscreen" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: cocoa.

qt.qpa.plugin: Could not find the Qt platform plugin "offscreen" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: cocoa.

When run manually from the command line I get the desired output file, but with a warning:

% "/Applications/MuseScore 4.app/Contents/MacOS/mscore" -f -o tmp/af4ab875-d20f-4337-821e-5a6c9bab387b/1713435303.536296.png tmp/af4ab875-d20f-4337-821e-5a6c9bab387b/1713435303.536296.mid
2024-04-18 12:16:57.566 mscore[38515:13677841] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.

Anyone have any ideas? I have reinstalled MuseScore, same result

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