Error when processing a blender file in Python I work on some system that generates objects in spatial configurations using Blender. I have a few samples of objects (.blend) file (e.g., cube, cylinder, sphere) and they work fine on my system. I tried to create more objects like: bottle, cup, toy, etc, and I follow tutorials on youtube but I always get errors when using them with python. One of these common errors is:
AttributeError: ‘AreaLamp’ object has no attribute ‘vertices’

This is particularly related to some code that loops over objects in the scene and use the vertices information of each object in order to calculate the centroid. So I can estimate that there is a problem in accessing vertex information.
Despite the fact that I compare the new blender files attentively to those that work well in the system, I have the same parameters in both but they always raise errors.
I attach a link to a new object (Cone) that I created which raised this error: Cone
VS
an original .blend file for an object (Sphere) which works in my python system without any problem:
Sphere
So what is missing that makes the (Cone) object raises this error?  Why isn't the vertex information accessible?
There's a chance you deleted the lamp but it's still lingering somewhere in your blendfile and the script is accessing it. To be sure this is not the case, try saving, closing, and opening the blendfile multiple times to completely get rid of unused data and try your script again. Or you can try copying the mesh files to a brand new blender scene without any object and run the script there