I am running into a crash in a script that used to work.
The script is this one I developed a few years ago and in Glyphs’ version 3.2 (3228) it started to throw this error:
File "Character set builder (UI).py", line 23
from drawBot import *
File "_init_.py", line 1
from .drawBotDrawingTools import _drawBotDrawingTool
File "drawBotDrawingTools.py", line 10
from .context import getContextForFileExt, getContextOptions, getFileExtensions, getContextOptionsDocs
File "_init_.py", line 1
from .pdfContext import PDFContext
File "pdfContext.py", line 7
from .baseContext import BaseContext, FormattedString
File "baseContext.py", line 11
from drawBot.macOSVersion import macOSVersion
File "macOSVersion.py", line 1
from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils.version'
As far as I see drawBot is looking for a macOSVersion that hasn’t a distutils.version declared. Does drawBot plugin need an update or is this something that can be fixed locally?
Hello Georg, MacOS is Ventura 13.6.1. I am running Glyphs 3.2 (3228) and updated drawbot and all modules from the Plugin Manager (by removing and re-installing them from the Plugin Manager).
ModuleNotFoundError: No module named ‘distutils’
App:3.2-3228 Plugin:0.0.6-10 System:13.6.1
I am who reported the problem to Ricard Garcia.
Thanks!
Hello! I am running into the same issue. My OS is Sonoma 14.2.1 (23C71), I have selected Glyphs for Python in preferences, and I am running the latest Glyphs version 3.2 (3234). I have also tested uninstalling and reinstalling Drawbot from the extensions manager a few times.
Maybe this, from GitHub, is pertinent: “The entire distutils package is deprecated, to be removed in Python 3.12. Its functionality for specifying package builds has already been completely replaced by third-party packages setuptools and packaging, and most other commonly used APIs are available elsewhere in the standard library (such as platform, shutil, subprocess or sysconfig). There are no plans to migrate any other functionality from distutils, and applications that are using other functions should plan to make private copies of the code.”