TypeError in page()