Python - Not finding armature So it's my first time writing a python script for Blender so I may not be entirely familiar with the API but I know enough python to code something. I'm trying to find an armature in code that is the child of an object.
object = bpy.data.objects['Armature']

for obj in bpy.data.objects:
    if(obj.parent == object):
        if(obj.type == 'ARMATURE'):
            armatureTo = obj.data
        

From what I've read online, that should work. It's getting the object with name Armature, which is the parent object I mentioned. Then iterating through the objects in the scene and checking if the parent objects and object types match with the armature I want and setting the variable to that object.
I'd greatly appreciate any help you can give me.
Look at the objects children
Instead of looking for objects with that parent, loop over that objects children.  All objects in a blend are in bpy.data.objects which may or may not be linked to a collection in the context scene.  Recommend working from scene rather than data, when applicable.
If the armature object &quot;Armature&quot; is in the scene iterate over its children.
import bpy

scene = bpy.context.scene
ob = scene.objects.get(&quot;Armature&quot;)

if ob:
    for c in ob.children:
        print(c.name, c.type)

To iterate over all objects in scene
for o in context.scene.objects:
    if o.parent == ob:
        print(o.name, o.type)

Do not confuse an object ss being the parent of its data.
The default armature object named &quot;Armature&quot;

The object (yellow with my theme)
&gt;&gt;&gt; C.object
bpy.data.objects['Armature']

has the data part (green)
&gt;&gt;&gt; C.object.data
bpy.data.armatures['Armature']