ModuleNotFoundError: No module named 'cStringIO

My script here used to work in G2, but now doesn’t work in G3 and throws this error:

3.0.3 (3078)

Traceback (most recent call last):
  File "Compare Fonts.py", line 14
    from objectsGS import RFont
  File "GlyphsApp/objectsGS.py", line 16
    BaseGlyph, BaseContour, BaseSegment, BasePoint, BaseBPoint, BaseAnchor, BaseGuide, \
  File "ufoLib.py", line 35
    from cStringIO import StringIO
ModuleNotFoundError: No module named 'cStringIO'

It may have to do with an outdated ufoLib and its installation. Why do you import/need that one? Not sure I understand exactly what the DigestPen does, but I believe the function of the script can be coded simpler without need for loading extra libraries.

DigestPen just returns a glyph in a simplified list of values so it’s easy to compare. You’re totally right I should be make this script with Glyphs App native API.

Is there already a function for comparing paths to see if they match?

There is a fast convenience function that checks for compatibility: GSLayer.compareString(). You could use that one in a first loop, and if it is True continue with more complex (and slower) checks.

Also check out GSShape.isEqualToShape_()