Start
Traceback (most recent call last):
File “Delete all non-Master layers.py”, line 31, in
File “Delete all non-Master layers.py”, line 19, in process
AttributeError: ‘NoneType’ object has no attribute 'find’
End
this is not the only script which isn’t working right.
Many other name the problem “NoneType”
I have the same problem regarding deleting glyphs (my own code). I am deleting glyphs that have a specific graphic (let’s say notdef outline), but it stops at certain point, giving this error, while there are many left.
If I ignore it and run many times, eventually I can delete all of them, so it seems that there’s no problem with specific glyphs.
I tried to fix it as good as I can with my skills.
works now also for empty layers. (But im not sure wether there are dangerous exceptions in the system …)
I add a new Suggestion on mekkablues ‘delete all non-master.py’ on Github. But there are still some error-messages.
The error message means that you are trying to run a function on an object which, for some reason, is None. In the case of the script mentioned above, the script first looked at the name of the layer and tried to find “[” and “]” in it, but an unnamed layer’s name is None, but the find() function only works on objects of the type string not of type None. And that was the error message you got.