You are trying to set the line color of a TObject. TObject does not inherit from Tattling there it does not have the SetLineColor method. You should tell use a bit more. Show your code so we can see what gr should be (very likely a TGraph I guess).
Yes, it is a TGraph. I think I found the problem. It was trying to access a TGraph from a file, which did not exist, and for some reason it gave the AttributeError instead of saying that the graph that I am trying to access does not exist. Weird, but at least the issue seems to be found.