Old script stopped working

After getting these error messages

Traceback (most recent call last):
  File "<internal>", line 1
ModuleNotFoundError: No module named 'objc'
Traceback (most recent call last):
  File "<macro panel>", line 1
NameError: name 'Glyphs' is not defined

I added this at the top of the script to try and fix it:

from GlyphsApp import Glyphs
import os
import objc

But I am still getting this error message now:

Traceback (most recent call last):
  File "runMacroFile", line 1
ModuleNotFoundError: No module named 'objc'
Traceback (most recent call last):
  File "NULL", line 1
NameError: name 'os' is not defined. Did you forget to import 'os'?
Traceback (most recent call last):
  File "layer-to-color-all.py", line 6
    from GlyphsApp import Glyphs
  File "GlyphsApp/GlyphsApp/__init__.py", line 5
ModuleNotFoundError: No module named 'objc'

I didn’t have any problems before. Is there any other change I need to apply to make my script work again?

This means your Python installation for Glyphs is broken/missing. Go to Settings > Modules and reinstall everything (it may take a while for Python to install, wait for it to complete)

Ohh! I’ve done that with just the Python module before posting here and it didn’t do anything, but removing and reinstalling ALL modules solved the problem. Thanks so much!