Update 531.py

i've marked the 6 spots that we need to catch exceptions at.