I'm trying to learn how to fix this too. I'm also having a "no stack object" error when trying to buy a box to take home. The Sim buys it just fine, but then it errors when the box is suppose to go into their inventory. Are you having this problem as well?
I'm trying my hardest to learn this
SimPE and modding stuff so that I can create more vending machine type objects, but it's so much more difficult that Sims 4 modding IMHO.
Good luck! I hope someone comes along and takes mercy on us! LOL!