Update model.py

added try/catch block to prevent non-printable properties  from being pretty-printed.