Thus, I’ve try to copy the drawbot lib folder from DrawBot.glyphsPlugin/Contents/Resources/drawBot to my plugin’s Resources folder to try to access the lib. This time it returns another error:
You could try to add these lines to the start method of your plugin:
from sys import path
print(path)
Then you can see if the drawBot plugin is in you path. It should list something like /Users/<user>/Library/Application Support/Glyphs 3/Repositories/DrawBotGlyphsPlugin/DrawBot.glyphsPlugin/Contents/Resources, and if this is contained in the list, you should be able to import from drawBot.
But I think this was broken in a couple of Glyphs versions. Maybe try updating to the most recent version?
I’ve check that /Users/<user>/Library/Application Support/Glyphs 3/Repositories/DrawBotGlyphsPlugin/DrawBot.glyphsPlugin/Contents/Resources is in my path, and also update to the latest Glyphs version.
However, the plugin still get the error while trying to import drawBot module.
It might be that the plugins are loaded in the “wrong” order. Meaning that your plugin is loaded before the Drawbot plugin. What you can do, is to add the from drawBot import * into the function that needs the drawbot stuff. Because by the time your code is run, the drawbot should be there.