GSPen and objectsGS Error: ImportError: cannot import name 'GSQCURVE' from 'objectsGS'

Hi, I’m trying to write a script and the code below caused an ImportError.
Could someone help me to solve the issue?


source = CurrentGlyph()


Traceback (most recent call last):
  File "<macro panel>", line 2
  File "", line 1453, in getPen
    return SegmentToPointPen(self.getPointPen())
  File "GlyphsApp/", line 660, in getPointPen
  File "GlyphsApp/", line 10
ImportError: cannot import name 'GSQCURVE' from 'objectsGS' (/Applications/Glyphs

My environment:

  • macOS Big Sur 11.2.3
  • Glyphs 3.0.3 (3081)
  • Python 3.9.4 (Homebrew)
    • Installed FontTools, Python, RoboFab, and Vanilla from the Plugin Manager
    • Installed PyObjC and FontTools with pip

Thanks in advance.

I omit the following part in the source code which was apparently where the problem is.

from import CurrentGlyph

source = CurrentGlyph()

This should reproduce the error.

However, I was able to get what I want from:

for layer in Font.selectedLayers:

Now it works perfect, thanks!

1 Like

Yes, for some pen methods, you do not need RoboFab anymore.

Is this the RoboFab module you instaled through Plugin Manager, or do you have a custom installation?

1 Like

I fixed the missing import. Thanks.

1 Like