Depythonifying 'char', got 'NoneType' error when exporting (3.2 (3170))

exportFolder = '/Users/me/Library/Fonts'
for instance in Glyphs.font.instances:
    instance.generate(FontPath = exportFolder)

Glyphs.showNotification('Export fonts', 'The export of %s was successful.' % (Glyphs.font.familyName))

produces the error:

Traceback (most recent call last):
  File "<macro panel>", line 4
  File "GlyphsApp/GlyphsApp/__init__.py", line 6459, in __GSInstance_Export__
ValueError: depythonifying 'char', got 'NoneType'

Glyphs version 3.2 (3170)

I didn’t see the error but I think I fixed it anyway. For now, add the RemoveOverlap argument:

instance.generate(FontPath=exportFolder, RemoveOverlap=True)