{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/raven-python/issues/766","repository_url":"https://api.github.com/repos/getsentry/raven-python","labels_url":"https://api.github.com/repos/getsentry/raven-python/issues/766/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/raven-python/issues/766/comments","events_url":"https://api.github.com/repos/getsentry/raven-python/issues/766/events","html_url":"https://github.com/getsentry/raven-python/issues/766","id":154612248,"number":766,"title":"Exception when formatting breadcrumbs","user":{"login":"tinycogio","id":7118930,"avatar_url":"https://avatars.githubusercontent.com/u/7118930?v=3","gravatar_id":"","url":"https://api.github.com/users/tinycogio","html_url":"https://github.com/tinycogio","followers_url":"https://api.github.com/users/tinycogio/followers","following_url":"https://api.github.com/users/tinycogio/following{/other_user}","gists_url":"https://api.github.com/users/tinycogio/gists{/gist_id}","starred_url":"https://api.github.com/users/tinycogio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinycogio/subscriptions","organizations_url":"https://api.github.com/users/tinycogio/orgs","repos_url":"https://api.github.com/users/tinycogio/repos","events_url":"https://api.github.com/users/tinycogio/events{/privacy}","received_events_url":"https://api.github.com/users/tinycogio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-13T00:52:25Z","updated_at":"2016-05-13T23:32:33Z","closed_at":null,"body":"We're seeing an issue where the formatting is failing for the breadcrumbs. This ends up being a problem **as nothing will get sent to Sentry** so we didn't realize we were not getting errors any more until we noticed a slight increase in 5xx responses.\r\n\r\nCan you catch exceptions while processing the breadcrumbs so we can at least see errors in Sentry without the breadcrumbs?\r\n\r\nUsing:\r\nPython 2.7\r\nDjango 1.6.6\r\nRaven 1.6.0\r\nUbuntu 14.04\r\n\r\n```\r\n[2016-05-12 23:40:40,969] ERROR:sentry.errors.client error\r\n Unable to process log entry: not all arguments converted during string formatting\r\nTraceback (most recent call last):\r\n  File \"/snip/CURRENT/local/lib/python2.7/site-packages/raven/contrib/django/models.py\", line 175, in sentry_exception_handler\r\n    client.captureException(exc_info=sys.exc_info(), request=request)\r\n  File \"/snip/CURRENT/local/lib/python2.7/site-packages/raven/base.py\", line 762, in captureException\r\n    'raven.events.Exception', exc_info=exc_info, **kwargs)\r\n  File \"/snip/CURRENT/local/lib/python2.7/site-packages/raven/contrib/django/client.py\", line 271, in capture\r\n    result = super(DjangoClient, self).capture(event_type, **kwargs)\r\n  File \"/snip/CURRENT/local/lib/python2.7/site-packages/raven/base.py\", line 591, in capture\r\n    **kwargs)\r\n  File \"/snip/CURRENT/local/lib/python2.7/site-packages/raven/contrib/django/client.py\", line 212, in build_msg\r\n    data = super(DjangoClient, self).build_msg(*args, **kwargs)\r\n  File \"/snip/CURRENT/local/lib/python2.7/site-packages/raven/base.py\", line 459, in build_msg\r\n    crumbs = self.context.breadcrumbs.get_buffer()\r\n  File \"/snip/CURRENT/local/lib/python2.7/site-packages/raven/breadcrumbs.py\", line 42, in get_buffer\r\n    processor(payload)\r\n  File \"/snip/CURRENT/local/lib/python2.7/site-packages/raven/breadcrumbs.py\", line 72, in processor\r\n    formatted_msg = msg % args\r\nTypeError: not all arguments converted during string formatting\r\nUnable to process log entry: not all arguments converted during string formatting```"},"comment":{"url":"https://api.github.com/repos/getsentry/raven-python/issues/comments/219183353","html_url":"https://github.com/getsentry/raven-python/issues/766#issuecomment-219183353","issue_url":"https://api.github.com/repos/getsentry/raven-python/issues/766","id":219183353,"user":{"login":"AndrewPashkin","id":4378647,"avatar_url":"https://avatars.githubusercontent.com/u/4378647?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewPashkin","html_url":"https://github.com/AndrewPashkin","followers_url":"https://api.github.com/users/AndrewPashkin/followers","following_url":"https://api.github.com/users/AndrewPashkin/following{/other_user}","gists_url":"https://api.github.com/users/AndrewPashkin/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewPashkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewPashkin/subscriptions","organizations_url":"https://api.github.com/users/AndrewPashkin/orgs","repos_url":"https://api.github.com/users/AndrewPashkin/repos","events_url":"https://api.github.com/users/AndrewPashkin/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewPashkin/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T23:32:33Z","updated_at":"2016-05-13T23:32:33Z","body":"+1 \r\n\r\nHere is my traceback:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/srv/rex/env/local/lib/python2.7/site-packages/raven/handlers/logbook.py\", line 49, in emit\r\n    return self._emit(record)\r\n  File \"/srv/rex/env/local/lib/python2.7/site-packages/raven/handlers/logbook.py\", line 100, in _emit\r\n    **handler_kwargs\r\n  File \"/srv/rex/env/local/lib/python2.7/site-packages/raven/base.py\", line 597, in capture\r\n    **kwargs)\r\n  File \"/srv/rex/env/local/lib/python2.7/site-packages/raven/base.py\", line 465, in build_msg\r\n    crumbs = self.context.breadcrumbs.get_buffer()\r\n  File \"/srv/rex/env/local/lib/python2.7/site-packages/raven/breadcrumbs.py\", line 42, in get_buffer\r\n    processor(payload)\r\n  File \"/srv/rex/env/local/lib/python2.7/site-packages/raven/breadcrumbs.py\", line 83, in processor\r\n    formatted_msg = msg % args\r\nTypeError: format requires a mapping\r\n```\r\n\r\nVersions:\r\nPython 2.7.6\r\nRaven 5.16.0\r\n\r\n"}}