Cannot add a new layer

When I try to add a new layer via Python using the exact same code that’s in, I get the following traceback error in other people’s machines (works in mine): GlyphsLayerProxy has no attribute “append”

Can anybody explain how to solve this?

You mean this one:

# add a new layer
newLayer = GSLayer() = '{125, 100}' # (example for glyph-level intermediate master)
# you may set the master ID that this layer will be associated with, otherwise the first master will be used
newLayer.associatedMasterId = font.masters[-1].id # attach to last master

Yes, that one. An attempt to append any layer to a glyph. It works in my machine, not in others.

The error sounds like you are trying to append to a single layer rather than the layers of the glyph.

Make sure they all have the latest version.

My colleague has 778 and it doesn’t work there. I literally copied and pasted the same code from the documentation page and it failed. And again, the code works for me, so I don’t think it’s a syntax error.

See if they have a or .pyc files in their Scripts folder and delete them.

Ah, that thing again. Yes it’s working now. Thanks!