{"action":"created","issue":{"url":"https://api.github.com/repos/honeybadger-io/honeybadger-python/issues/20","repository_url":"https://api.github.com/repos/honeybadger-io/honeybadger-python","labels_url":"https://api.github.com/repos/honeybadger-io/honeybadger-python/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/honeybadger-io/honeybadger-python/issues/20/comments","events_url":"https://api.github.com/repos/honeybadger-io/honeybadger-python/issues/20/events","html_url":"https://github.com/honeybadger-io/honeybadger-python/issues/20","id":213482818,"number":20,"title":"Local thread loses context in Flask app","user":{"login":"LanceOlsen","id":184895,"avatar_url":"https://avatars0.githubusercontent.com/u/184895?v=4","gravatar_id":"","url":"https://api.github.com/users/LanceOlsen","html_url":"https://github.com/LanceOlsen","followers_url":"https://api.github.com/users/LanceOlsen/followers","following_url":"https://api.github.com/users/LanceOlsen/following{/other_user}","gists_url":"https://api.github.com/users/LanceOlsen/gists{/gist_id}","starred_url":"https://api.github.com/users/LanceOlsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LanceOlsen/subscriptions","organizations_url":"https://api.github.com/users/LanceOlsen/orgs","repos_url":"https://api.github.com/users/LanceOlsen/repos","events_url":"https://api.github.com/users/LanceOlsen/events{/privacy}","received_events_url":"https://api.github.com/users/LanceOlsen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"demsullivan","id":3767534,"avatar_url":"https://avatars1.githubusercontent.com/u/3767534?v=4","gravatar_id":"","url":"https://api.github.com/users/demsullivan","html_url":"https://github.com/demsullivan","followers_url":"https://api.github.com/users/demsullivan/followers","following_url":"https://api.github.com/users/demsullivan/following{/other_user}","gists_url":"https://api.github.com/users/demsullivan/gists{/gist_id}","starred_url":"https://api.github.com/users/demsullivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demsullivan/subscriptions","organizations_url":"https://api.github.com/users/demsullivan/orgs","repos_url":"https://api.github.com/users/demsullivan/repos","events_url":"https://api.github.com/users/demsullivan/events{/privacy}","received_events_url":"https://api.github.com/users/demsullivan/received_events","type":"User","site_admin":false},"assignees":[{"login":"demsullivan","id":3767534,"avatar_url":"https://avatars1.githubusercontent.com/u/3767534?v=4","gravatar_id":"","url":"https://api.github.com/users/demsullivan","html_url":"https://github.com/demsullivan","followers_url":"https://api.github.com/users/demsullivan/followers","following_url":"https://api.github.com/users/demsullivan/following{/other_user}","gists_url":"https://api.github.com/users/demsullivan/gists{/gist_id}","starred_url":"https://api.github.com/users/demsullivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demsullivan/subscriptions","organizations_url":"https://api.github.com/users/demsullivan/orgs","repos_url":"https://api.github.com/users/demsullivan/repos","events_url":"https://api.github.com/users/demsullivan/events{/privacy}","received_events_url":"https://api.github.com/users/demsullivan/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2017-03-10T23:49:47Z","updated_at":"2017-12-01T13:04:50Z","closed_at":null,"author_association":"NONE","body":"I am running a Flask app, and using `notify` in an `errorhandler` decorator:\r\n\r\n    @app.errorhandler(Exception)\r\n    def handle_error(e):\r\n        honeybadger.notify(e, context={})\r\n        # other error related functionality\r\n\r\nIn the `__init__.py` file for this app I have:\r\n\r\n    from honeybadger import honeybadger\r\n    honeybadger.configure(api_key=\"blablah\")\r\n\r\nI'm getting the following error:\r\n\r\n    Traceback (most recent call last):\r\n      File \"/root/miniconda3/lib/python3.6/site-packages/flask/app.py\", line 1982, in wsgi_app\r\n        response = self.full_dispatch_request()\r\n      File \"/root/miniconda3/lib/python3.6/site-packages/flask/app.py\", line 1614, in full_dispatch_request\r\n        rv = self.handle_user_exception(e)\r\n      File \"/root/miniconda3/lib/python3.6/site-packages/flask/app.py\", line 1518, in handle_user_exception\r\n        return handler(e)\r\n      File \"/root/my_app/api.py\", line 116, in handle_error\r\n        honeybadger.notify(e, context={})\r\n      File \"/root/miniconda3/lib/python3.6/site-packages/honeybadger/core.py\", line 43, in notify\r\n        merged_context = self.thread_local.context\r\n    AttributeError: '_thread._local' object has no attribute 'context'\r\n"},"comment":{"url":"https://api.github.com/repos/honeybadger-io/honeybadger-python/issues/comments/348489750","html_url":"https://github.com/honeybadger-io/honeybadger-python/issues/20#issuecomment-348489750","issue_url":"https://api.github.com/repos/honeybadger-io/honeybadger-python/issues/20","id":348489750,"user":{"login":"demsullivan","id":3767534,"avatar_url":"https://avatars1.githubusercontent.com/u/3767534?v=4","gravatar_id":"","url":"https://api.github.com/users/demsullivan","html_url":"https://github.com/demsullivan","followers_url":"https://api.github.com/users/demsullivan/followers","following_url":"https://api.github.com/users/demsullivan/following{/other_user}","gists_url":"https://api.github.com/users/demsullivan/gists{/gist_id}","starred_url":"https://api.github.com/users/demsullivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demsullivan/subscriptions","organizations_url":"https://api.github.com/users/demsullivan/orgs","repos_url":"https://api.github.com/users/demsullivan/repos","events_url":"https://api.github.com/users/demsullivan/events{/privacy}","received_events_url":"https://api.github.com/users/demsullivan/received_events","type":"User","site_admin":false},"created_at":"2017-12-01T13:04:50Z","updated_at":"2017-12-01T13:04:50Z","author_association":"COLLABORATOR","body":"@ifoukarakis thanks for the sample! I'll look into getting this fixed up as soon as I can."}}
{"actor":{"display_login":"demsullivan"}}