Fatal error getAttributeKeyID()

Permalink
Hello, I tried to add new attribute type to my website's checkout page. Now I am getting this error and I think I need a little help: Fatal error: Call to a member function getAttributeKeyID() on a non-object in /var/www/customers/mywebsite/public_html/packages/core_commerce/models/order/model.php on line 523

I tried to find a way to fix this problem and I tried a couple ones, but it's still saying that same error.