Traceback (most recent call last):
File "<string>", line 41, in <module>
File "GlyphsApp/__init__.py", line 3142, in <lambda>
File "GlyphsApp/__init__.py", line 2173, in SetObjectInLayer_selected
AttributeError: '__LayerSelectionProxy' object has no attribute 'append'
Version 2.4.1 (973), but also some CE versions before, I just made an update after seeing this error.
Yesterday it worked on another machine (probably the latest or pre last cutting edge), cannot check it there now.
BTW: do you have a style policy concerning the potential confusion between get and set methods? In some cases one cannot »reassign« by calling object.property = xyz and sometimes like here you can. I got no particular examples ready except for .setKerningForPair(), but it sometimes appears at least when working with pyobjc, where there is a rather straight distinction. Makes me expect to have something like .setSelected()… But I must admit, having just .selected for getting and setting is way easier.
Yes, that would be the most pythonesque way. If it is wrapped nicely, that is usually how it will work. Of course work on the wrapper is a work in progress.
More complicated things, like setting kerning, require multiple arguments and will still have a method.
Glyphs 973, Mac 10.11.4
New, empty file with a single oval drawn into letter /A. If nothing or at least any amount of nodes is selected, I get that error each time.
If all nodes are selected, nothing happens (as expected, it cannot do more selection. But now, if calling Glyphs.font.selectedLayers[0].paths[0].nodes[0].selected = False it returns:
Traceback (most recent call last):
File "<string>", line 41, in <module>
File "GlyphsApp/__init__.py", line 3142, in <lambda>
File "GlyphsApp/__init__.py", line 2177, in SetObjectInLayer_selected
AttributeError: '__LayerSelectionProxy' object has no attribute 'remove'
Edit:
Thanks for letting me know that you don’t have that. This made me remove plugins one by one and test. I found out that the DrawBot Plugin is causing it. I got the one installed via the Plugin Manager.
I checked the github repo, but couldn’t find anything that interferes with layer and/or selection …