Object warning in 2.8

What is Warning: Objects have no data to transform ? How do I figure out what is causing it? I’m trying to get a addon working with 2.8 and I get this warning.

Just a guess and without grepping the code for the error message, your Object has no ObData. Presumably, this shows up in the Outliner. Maybe some badly constructed objects?

I will post some code when I get some time. I thought it was maybe the camera and light causing it. I deleted everything ,but the object and it still gives that warning. I tried to comment out and go through the code ,but had no success.

Looks like these is giving me the warning message.

bpy.ops.object.transform_apply(rotation=True)

and

bpy.ops.object.transform_apply(location=True)

I have several of these in my code. When I comment those out, I don’t get the message. I don’t get why it works in 2.79.