python import raven raven_client = raven.Client('<your-sentry-dsn>') try: raise ValueError('This is a sample error.') except Exception as e: raven_client.captureException()