Hi guys,
Just keep getting error messages after running the following code:
from robofab.world import CurrentFont
myFont = CurrentFont()
for myGlyph in myFont:
print myGlyph.name
myGlyph.autoContourOrder()
myGlyph.correctDirection()
myGlyph.update()
for myContours in myGlyph.contours:
myContours.autoStartSegment()
print "done now"
This is the error message:
Traceback (most recent call last):
File "", line 16, in ?
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/RoboFab/robofab/objects/objectsBase.py", line 2129, in autoStartSegment
on = segment.onCurve
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/RoboFab/robofab/objects/objectsBase.py", line 2330, in _get_onCurve
return self.points[-1]
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/RoboFab/robofab/objects/objectsFL.py", line 1942, in _get_points
node = self._node
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/RoboFab/robofab/objects/objectsFL.py", line 1880, in _get__node
return glyph.nodes[self._nodeIndex]
IndexError: list index out of range
The weird thing is (after running it a second time) it will not bump into the same problem again, but rather continues to the next problem, if that makes sense. After a while the script runs fine. Really have no clue here.
Thanks,
Bruno