# Glyphs 4: instance.generate = Return type is None, but should be bool/list

**URL:** <https://forum.glyphsapp.com/t/glyphs-4-instance-generate-return-type-is-none-but-should-be-bool-list/37229>\
**Category:** Scripting\
**Tags:** bug\
**Created:** [September 8, 2026, 11:56am UTC](https://forum.glyphsapp.com/t/glyphs-4-instance-generate-return-type-is-none-but-should-be-bool-list/37229 "2026-09-08T11:56:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olli](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/olli/32/30327_2.png) [@Olli](https://forum.glyphsapp.com/u/Olli)\
**Post date:** [September 8, 2026, 11:56am UTC](https://forum.glyphsapp.com/t/glyphs-4-instance-generate-return-type-is-none-but-should-be-bool-list/37229/1 "2026-09-08T11:56:50Z")

</div>

Hi Georg,

it looks like the return type of instance.generate() has changed with Glyphs 4.

The **Return type** used to be _bool/list_, but is None within Glyphs 4.

Try this code:

```auto
from GlyphsApp import Glyphs, INSTANCETYPEVARIABLE, OTF, TTF, Message

font_obj = Glyphs.font

for instance in font_obj.instances:
	print("instance: ", instance.fullName)
	if not instance.active:
		continue
	if instance.type == INSTANCETYPEVARIABLE:
		continue

	export_path = "/Users/ollimeier/Downloads"
	exportResult = instance.generate(OTF, export_path, autoHint=False, removeOverlap=True, useSubroutines=False)
	print("exportResult: ", exportResult)

```

That’s why some of my scripts fail within Glyphs 4.

---

<div class="post-metadata">

**Author:** ![Olli](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/olli/32/30327_2.png) [@Olli](https://forum.glyphsapp.com/u/Olli)\
**Post date:** [September 8, 2026, 12:00pm UTC](https://forum.glyphsapp.com/t/glyphs-4-instance-generate-return-type-is-none-but-should-be-bool-list/37229/2 "2026-09-08T12:00:35Z")

</div>

The documentation says _" **Returns:** On success, True; on failure, error message."_, why I expect _None_ is wrong. I am wondering if you have changed it on purpose and if the documentation is outdated?
