add try exception statement to page.py