ABC Import (plugin) not working since updating MuseScore

• Jun 6, 2024 - 21:12

I just updated to 4.3.1 and find my ABC Import plugin doesn't work.
Here is the process i've been using hereto:
-I acquire an ABC file from https://thesession.org/ - it comes down as a ".abc" file.
-I open this file using Notepad (Win11 pc).
-Select All & Copy.
-Open MuseScore
-Start a New Score (just General- treble clef)
-Go to Plugins then ABC Import
-This opens a window where you can Paste your ABC tune, or use an Open file button (I choose to paste).
-Then click Import.
-This creates an XML file
But when MuseScore tries to open the xml file it give error that its not a valid MusicXML file.
I can see that it's not going to work because the XML file is just 1kb.

When i open the XML file in Notepad it shows there was an internal server error.

<head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at 
 webmaster@musescore.jeetee.net to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body>

Comments

Hi Everyone!
I've updated the ABC import plugin to work with Musescore 4.3 and up and it works on my Linux laptops. Unfortunately, I tried it on Windows and it doesn't work, and I couldn't find a way to get the log/debug information on Windows.

So if you have Linux, I encourage you to try it: https://github.com/vgstef/abc_import/tree/mscore4.3%2B

There are still limitations because of MS Api, but at least we can again convert ABC texts.

And if you know how to debug a plugin on Windows, please tell me!

In reply to by vgStef

In 4.3.2 that plugin doesn't show at all. It does show in 4.4.4, but doesn't work there, showing only an empty dialog window

From the logs (of a 4.3.2 PortableApp):

2025-03-09T11:14:23.040 | ERROR | main_thread | PluginView::load | Failed to load QML plugin from QVariant(QUrl, QUrl("file:///C:/Users/Jojo/Documents/MuseScore4/Plugins/abc_import/abc_import.qml"))
2025-03-09T11:14:23.040 | ERROR | main_thread | PluginView::load | "file:///C:/Users/Jojo/Documents/MuseScore4/Plugins/abc_import/abc_import.qml: Library import requires a version"

In reply to by vgStef

Try the attached

$ diff -u abc_import.qml~ abc_import.qml
--- abc_import.qml~     2025-03-09 11:21:59.715431900 +0100
+++ abc_import.qml      2025-03-09 11:19:39.919125300 +0100
@@ -17,24 +17,32 @@
 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 //=============================================================================
 
-import QtQuick
-import QtQuick.Dialogs
-import QtQuick.Controls
-import QtQuick.Window
-import MuseScore
-import FileIO
+import QtQuick 2.9
+import QtQuick.Dialogs 1.2
+import QtQuick.Controls 2.2
+import QtQuick.Window 2.3
+import MuseScore 3.0
+import FileIO 3.0
 
 MuseScore {
     menuPath: "Plugins.ABC Import"
-    title: "ABC Import"
-    version: "4.1.0"
+    version: "4.3.0"
     description: qsTr("This plugin imports ABC text from a file or the clipboard. Internet connection is required.")
-    thumbnailName: "abc-import.png"
-    categoryCode: "import"
     requiresScore: false
     pluginType: "dialog"
 
     id: pluginDialog
+    //4.4 title: qsTr("ABC Import")
+    //4.4 thumbnailName: "abc-import.png"
+    //4.4 categoryCode: "import"
+    Component.onCompleted : {
+        if (mscoreMajorVersion >= 4 && mscoreMinorVersion <= 3) {
+            pluginDialog.title = qsTr("ABC Import");
+            pluginDialog.thumbnailName = "abc-import.png";
+            pluginDialog.categoryCode = "import";
+        }
+    }
+
     width: 800; height: 600;
 
     onRun: {}
Attachment Size
abc_import.qml 6.62 KB

In reply to by Jojo-Schmitz

Thanks Jojo, I tried you file, but it doesn't work on Windows 11 and on Linux. On Linux, when I remove the version of the import modules, it works (that's why there was no version in my file). By the version, at least since Qt 6, the version is optional. And if not mentioned, it will use the latest version available on the system.

And yes, on Windows 11, the plugin only shows an empty windows. And that's what I'm trying to debug.

For the log, I can't find them. In which folder are they on Windows?

In reply to by vgStef

It does work on Windows 11, that's what I tried.
"I've updated the ABC import plugin to work with Musescore 4.3" Ignoring the "and up" for now)
With MuseScore 4.3.2. Not with 4.4.4.
The logs are where the other settings are too, C:\Users\USERNAME\AppData\Local\MuseScore\MuseScore4\logs

Qt 5.15 (like used in MuseScore 4.3.2) apparently needs those version numbers, only 4.4 uses Qt 6.2.9 and doesn't need them anymore, but there they don't harm at least. The reason for the empty dialog is not related to those version number but to the different Qt versions and the difference in 4.4's framework API

In reply to by Jojo-Schmitz

This works (4.4 and 4.3 on Linux)

diff abc_import.qml abc_import.qml-orig
20,24c20,25
< import QtQuick 2.2
< import QtQuick.Controls 2.15
< import MuseScore 3.0
< import FileIO 3.0

<

> import QtQuick
> import QtQuick.Dialogs
> import QtQuick.Controls
> import QtQuick.Window
> import MuseScore
> import FileIO
90,93d90
< focus: true // Ensure it can receive focus
< readOnly: false // Ensure it's editable
< selectByMouse: true // Allow mouse selection
< selectByKeyboard: true // Allow keyboard selection

(focus lines added)
(only tested on Linux, 4.4 and 4.3)

Attachment Size
abc_import.qml 6.49 KB

In reply to by graffesmusic

Again: with Qt 5.x you need the version numbers. 4.3 used Qt 5.x. unless maybe you're using FlatPak or a selfbuilt one
Else (like in 4.3.2 PortableApp on Windows 11) you get this in the logs:

2025-03-10T09:38:58.860 | ERROR | main_thread | PluginView::load | Failed to load QML plugin from QVariant(QUrl, QUrl("file:///C:/Users/Jojo/Documents/MuseScore4/Plugins/abc_import/abc_import.qml"))
2025-03-10T09:38:58.861 | ERROR | main_thread | PluginView::load | "file:///C:/Users/Jojo/Documents/MuseScore4/Plugins/abc_import/abc_import.qml:52:5: FileDialog is not a type"

and the plugin doesn't get loaded

The 4 added lines and the 2 deleted imports indeed seems to make the plugin work in 4.4 though!

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