def __str__(self):
    if hasattr(self, 'near'):
      return '%s\n\nNear: %s' % (self.args[0], pprint.pformat(self.near))
    else:
      return self.args[0]
This helps people debug their templates.
dataset/ETHPy150Open cloudbuilders/radioedit/jsontemplate.py/Error.__str__