Attribute error fix

not all objects have attribute __dict__