iTunes "delete" error

I have the following line of code:


tell application "iTunes" to delete theTrack

(thetrack is a file track object) I get this error (only for some file tracks):

“iTunes got an error: file track id 14032 of user playlist id 3674 of source id 34 doesn’t understand the delete message.”

Any idea why this would be? I’m simply trying to delete a track from my iTunes library. Thanks!

I figured it out guys. As it turns out, I was experimenting with the portion of my script that ran through the selected tracks only, and I had selected tracks within a smart playlist. When I selected the same tracks in the library all worked fine.