This happened to me and I was trying to record on a tape which had its little "don't record over this" tabs punched out.
Also, check any spring or latch which holds the cassette in place, if it is off or broken then the machine can sense the tape is not locked into position and won't work.