I believe this except clause should be at line 69 (after the rest of the loop body) so that it doesn't keep trying to do anything w/ content_path