Python drawing commands broken?

I get errors for some of the drawing commands in Glyphs 3.2, 3.3…:

from GlyphsApp.drawingTools import *

save()
strokeWidth(2)
text("Hello", (100, 100))
restore()

text():

File "GlyphsApp/GlyphsApp/drawingTools.py", line 214, in text
ValueError: NSInvalidArgumentException - -[NSNull set]: unrecognized selector sent to instance 0x1f00d25c0

strokeWidth():

  File "GlyphsApp/GlyphsApp/drawingTools.py", line 158, in strokeWidth
AttributeError: 'NSBezierPath' object attribute 'lineWidth' is read-only

In what context do you use this? I didn’t use this in a while but I think it needs to be used inside a drawing callback.

I am using them in a drawing callback. You can put that example code e.g. in Skedge to see the tracebacks.

Fixed it. Thanks.