# Glyphs 4: Freemix: Adopt Background

**URL:** <https://forum.glyphsapp.com/t/glyphs-4-freemix-adopt-background/36963>\
**Category:** Glyphs\
**Created:** [August 7, 2026, 4:27pm UTC](https://forum.glyphsapp.com/t/glyphs-4-freemix-adopt-background/36963 "2026-08-07T16:27:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebsan](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/sebsan/32/45_2.png) [@sebsan](https://forum.glyphsapp.com/u/sebsan)\
**Post date:** [August 7, 2026, 4:27pm UTC](https://forum.glyphsapp.com/t/glyphs-4-freemix-adopt-background/36963/1 "2026-08-07T16:27:48Z")

</div>

script doesn’t seem to work on G4  
any tips to go about fixing it ?

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [August 7, 2026, 4:53pm UTC](https://forum.glyphsapp.com/t/glyphs-4-freemix-adopt-background/36963/2 "2026-08-07T16:53:47Z")

</div>

Works for me. Do you get an error message?

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [August 7, 2026, 4:56pm UTC](https://forum.glyphsapp.com/t/glyphs-4-freemix-adopt-background/36963/3 "2026-08-07T16:56:25Z")

</div>

The script needs to be updated to explicitly import GSNode, OFFCURVE, ONCURVE and some other constants, if I remember correctly. This is an annoying new behaviour in G4.

You should get an error message about an unknown name. At the top of the script, add:

```auto
from GlyphsApp import GSNode, GSAnchor, OFFCURVE, CURVE

```

There might be more.

---

<div class="post-metadata">

**Author:** ![sebsan](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/sebsan/32/45_2.png) [@sebsan](https://forum.glyphsapp.com/u/sebsan)\
**Post date:** [August 7, 2026, 5:02pm UTC](https://forum.glyphsapp.com/t/glyphs-4-freemix-adopt-background/36963/4 "2026-08-07T17:02:39Z")

</div>

Yes! I am getting this error:

Traceback (most recent call last):  
File “Adopt Background.py”, line 99  
subpaths = subpaths( selection )  
File “Adopt Background.py”, line 58, in subpaths  
selection.append( GSNode() )  
^^^^^^  
NameError: name ‘GSNode’ is not defined

---

<div class="post-metadata">

**Author:** ![sebsan](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/sebsan/32/45_2.png) [@sebsan](https://forum.glyphsapp.com/u/sebsan)\
**Post date:** [August 7, 2026, 5:06pm UTC](https://forum.glyphsapp.com/t/glyphs-4-freemix-adopt-background/36963/5 "2026-08-07T17:06:05Z")

</div>

I included your snippet at the top but I still get an error:

Traceback (most recent call last):  
File “Adopt Background.py”, line 2  
ImportError: cannot import name ‘ONCURVE’ from ‘GlyphsApp’ (/Applications/Glyphs 4.app/Contents/Scripts/GlyphsApp/ **init**.py). Did you mean: ‘CURVE’?

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [August 7, 2026, 5:24pm UTC](https://forum.glyphsapp.com/t/glyphs-4-freemix-adopt-background/36963/6 "2026-08-07T17:24:58Z")

</div>

Then put CURVE instead.

---

<div class="post-metadata">

**Author:** ![sebsan](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/sebsan/32/45_2.png) [@sebsan](https://forum.glyphsapp.com/u/sebsan)\
**Post date:** [August 7, 2026, 5:31pm UTC](https://forum.glyphsapp.com/t/glyphs-4-freemix-adopt-background/36963/7 "2026-08-07T17:31:27Z")

</div>

that worked ! thanks

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [August 7, 2026, 7:34pm UTC](https://forum.glyphsapp.com/t/glyphs-4-freemix-adopt-background/36963/8 "2026-08-07T19:34:09Z")

</div>

> [@SCarewe](#):
>
> The script needs to be updated to explicitly import GSNode, OFFCURVE, ONCURVE and some other constants, if I remember correctly. This is an annoying new behaviour in G4.

The explicit import requirement is annoying, I know. But when it is done, it helps tremendously with code checkers like flake8 or pyright. The advantage of being able to automatically check the code outweighs the cost. And you can do that in the Scripting Window. Check etc popup next to the clean button. There you can set it up and control it.
