Error while trying tp print sample

Any idea why I keep getting the error shows below:

TypeError: $(…).attr(…) is undefined

You’ll have to provide more information. It looks like you’re trying to update an attribute to an element that just isn’t there. But without more information, it’s almost impossible to tell.