Update photo.py to trap an error condition.