Welcome to the Pentax Forums!
What you described sounds a lot like what happens when the sprockets are not fully engaged before closing the back of the camera. It is very important that the sprockets, both top and bottom be fully engaged with the film flat across the film gate as shown in the loading instructions on page 10 of the user manual. It is the sprockets, not the take-up spool that pulls the film out of the canister and everyone who shoots 35mm film has had this happen at least once.
The manual is available for free download from
Pentax Manuals (pdf). The password to open is "Pentax".
BTW...be sure to thoroughly look for and remove any film shards that might be floating around the film chamber. Those can cause future problems if they get into the works.
Steve