Confused with chained Python script when creating data block
Although I don't understand what you're doing, I know that the approach you're doing throws an error. If you go to the default scripting widow, at the bottom left it shows all the API calls you have done so if you shift+a&gt;light&gt;point, it will show
bpy.ops.object.light_add(type='POINT', radius=1, align='WORLD', location=(0, 0, 0))

And sure enough, if we run it it will create a light.