{"action":"created","issue":{"url":"https://api.github.com/repos/librato/librato-python-web/issues/34","repository_url":"https://api.github.com/repos/librato/librato-python-web","labels_url":"https://api.github.com/repos/librato/librato-python-web/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/librato/librato-python-web/issues/34/comments","events_url":"https://api.github.com/repos/librato/librato-python-web/issues/34/events","html_url":"https://github.com/librato/librato-python-web/issues/34","id":134337188,"number":34,"title":"IndexError: pop from empty list in Flask apps","user":{"login":"vslavik","id":145881,"avatar_url":"https://avatars.githubusercontent.com/u/145881?v=3","gravatar_id":"","url":"https://api.github.com/users/vslavik","html_url":"https://github.com/vslavik","followers_url":"https://api.github.com/users/vslavik/followers","following_url":"https://api.github.com/users/vslavik/following{/other_user}","gists_url":"https://api.github.com/users/vslavik/gists{/gist_id}","starred_url":"https://api.github.com/users/vslavik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vslavik/subscriptions","organizations_url":"https://api.github.com/users/vslavik/orgs","repos_url":"https://api.github.com/users/vslavik/repos","events_url":"https://api.github.com/users/vslavik/events{/privacy}","received_events_url":"https://api.github.com/users/vslavik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-02-17T16:55:46Z","updated_at":"2016-03-02T13:13:29Z","closed_at":null,"body":"Using Python 3.4, Flask 0.10.1, in what appears to be error path when the application code throws an exception to indicate 403:\r\n\r\n```\r\nIndexError: pop from empty list\r\n  File \"flask/app.py\", line 1817, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"flask/app.py\", line 1477, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"flask/app.py\", line 1381, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"flask/_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"flask/app.py\", line 1475, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"librato_python_web/instrumentor/instrument.py\", line 338, in wrapper\r\n    return wrapper_function(f)(*args, **keywords)\r\n  File \"librato_python_web/instrumentor/web/flask_.py\", line 88, in decorator\r\n    context.pop_tag()\r\n  File \"librato_python_web/instrumentor/context.py\", line 224, in pop_tag\r\n    o = _get_stack().pop()\r\n```"},"comment":{"url":"https://api.github.com/repos/librato/librato-python-web/issues/comments/191233865","html_url":"https://github.com/librato/librato-python-web/issues/34#issuecomment-191233865","issue_url":"https://api.github.com/repos/librato/librato-python-web/issues/34","id":191233865,"user":{"login":"vslavik","id":145881,"avatar_url":"https://avatars.githubusercontent.com/u/145881?v=3","gravatar_id":"","url":"https://api.github.com/users/vslavik","html_url":"https://github.com/vslavik","followers_url":"https://api.github.com/users/vslavik/followers","following_url":"https://api.github.com/users/vslavik/following{/other_user}","gists_url":"https://api.github.com/users/vslavik/gists{/gist_id}","starred_url":"https://api.github.com/users/vslavik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vslavik/subscriptions","organizations_url":"https://api.github.com/users/vslavik/orgs","repos_url":"https://api.github.com/users/vslavik/repos","events_url":"https://api.github.com/users/vslavik/events{/privacy}","received_events_url":"https://api.github.com/users/vslavik/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T13:13:29Z","updated_at":"2016-03-02T13:13:29Z","body":"(Sorry, I missed the notification about your question in an inbox flood…) I don't use the .pth *now*, but I did at first and the consequences for gevent weren't immediately obvious.\r\n\r\n> Wouldn't the .pth file be a no-op since LIBRATO_INSTRUMENT_PYTHON isn't set?\r\n\r\nIn its *current* for, yes — almost. *Some* code is still being imported, including the `os` module (which gevent patches) too, but it is or should be — again, in the current state of the code — harmless.  "}}