The error occurred because you were trying to remove an autofilter that didn't exist.
Do you want to add these manually or in code?