It's not a very robust script. Check that your object names won't screw it up. Check that you aren't trying to export hidden objects.
... I guess a DETTEMPSHAPE means it stopped before it finished exporting the detail32 layer. Maybe it's issue is with one of the objects on that layer.