{"action":"created","issue":{"url":"https://api.github.com/repos/Crapworks/RESTlos/issues/5","repository_url":"https://api.github.com/repos/Crapworks/RESTlos","labels_url":"https://api.github.com/repos/Crapworks/RESTlos/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/Crapworks/RESTlos/issues/5/comments","events_url":"https://api.github.com/repos/Crapworks/RESTlos/issues/5/events","html_url":"https://github.com/Crapworks/RESTlos/issues/5","id":170842353,"number":5,"title":"AttributeError: 'function' object has no attribute 'get'","user":{"login":"petrovicboban","id":13204754,"avatar_url":"https://avatars.githubusercontent.com/u/13204754?v=3","gravatar_id":"","url":"https://api.github.com/users/petrovicboban","html_url":"https://github.com/petrovicboban","followers_url":"https://api.github.com/users/petrovicboban/followers","following_url":"https://api.github.com/users/petrovicboban/following{/other_user}","gists_url":"https://api.github.com/users/petrovicboban/gists{/gist_id}","starred_url":"https://api.github.com/users/petrovicboban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrovicboban/subscriptions","organizations_url":"https://api.github.com/users/petrovicboban/orgs","repos_url":"https://api.github.com/users/petrovicboban/repos","events_url":"https://api.github.com/users/petrovicboban/events{/privacy}","received_events_url":"https://api.github.com/users/petrovicboban/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Crapworks/RESTlos/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"Crapworks","id":1851528,"avatar_url":"https://avatars.githubusercontent.com/u/1851528?v=3","gravatar_id":"","url":"https://api.github.com/users/Crapworks","html_url":"https://github.com/Crapworks","followers_url":"https://api.github.com/users/Crapworks/followers","following_url":"https://api.github.com/users/Crapworks/following{/other_user}","gists_url":"https://api.github.com/users/Crapworks/gists{/gist_id}","starred_url":"https://api.github.com/users/Crapworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Crapworks/subscriptions","organizations_url":"https://api.github.com/users/Crapworks/orgs","repos_url":"https://api.github.com/users/Crapworks/repos","events_url":"https://api.github.com/users/Crapworks/events{/privacy}","received_events_url":"https://api.github.com/users/Crapworks/received_events","type":"User","site_admin":false},"assignees":[{"login":"Crapworks","id":1851528,"avatar_url":"https://avatars.githubusercontent.com/u/1851528?v=3","gravatar_id":"","url":"https://api.github.com/users/Crapworks","html_url":"https://github.com/Crapworks","followers_url":"https://api.github.com/users/Crapworks/followers","following_url":"https://api.github.com/users/Crapworks/following{/other_user}","gists_url":"https://api.github.com/users/Crapworks/gists{/gist_id}","starred_url":"https://api.github.com/users/Crapworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Crapworks/subscriptions","organizations_url":"https://api.github.com/users/Crapworks/orgs","repos_url":"https://api.github.com/users/Crapworks/repos","events_url":"https://api.github.com/users/Crapworks/events{/privacy}","received_events_url":"https://api.github.com/users/Crapworks/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-08-12T10:23:59Z","updated_at":"2016-08-12T13:22:14Z","closed_at":null,"body":"`$ curl -H \"content-type: application/json\" 'http://admin:password@x.x.x.x/host?host_name=app'` returns  \r\n`curl: (52) Empty reply from server`\r\n\r\nApplication crashes with:\r\n```\r\n\\# ./restlosapi.py   \r\n\r\n\r\n \\* starting restlos V0.3\r\n \\* Running on http://0.0.0.0:80/ (Press CTRL+C to quit)\r\n91.222.7.8 - - [12/Aug/2016 12:10:13] \"GET /host HTTP/1.1\" 200 -\r\nTraceback (most recent call last):\r\n  File \"./restlosapi.py\", line 363, in <module>\r\n    app.run(host='0.0.0.0', port=config['port'])\r\n  File \"/usr/lib64/python2.7/site-packages/flask/app.py\", line 843, in run\r\n    run_simple(host, port, self, **options)\r\n  File \"/usr/lib/python2.7/site-packages/werkzeug/serving.py\", line 694, in run_simple\r\n    inner()\r\n  File \"/usr/lib/python2.7/site-packages/werkzeug/serving.py\", line 659, in inner\r\n    srv.serve_forever()\r\n  File \"/usr/lib/python2.7/site-packages/werkzeug/serving.py\", line 499, in serve_forever\r\n    HTTPServer.serve_forever(self)\r\n  File \"/usr/lib64/python2.7/SocketServer.py\", line 238, in serve_forever\r\n    self._handle_request_noblock()\r\n  File \"/usr/lib64/python2.7/SocketServer.py\", line 297, in _handle_request_noblock\r\n    self.handle_error(request, client_address)\r\n  File \"/usr/lib64/python2.7/SocketServer.py\", line 295, in _handle_request_noblock\r\n    self.process_request(request, client_address)\r\n  File \"/usr/lib64/python2.7/SocketServer.py\", line 321, in process_request\r\n    self.finish_request(request, client_address)\r\n  File \"/usr/lib64/python2.7/SocketServer.py\", line 334, in finish_request\r\n    self.RequestHandlerClass(request, client_address, self)\r\n  File \"/usr/lib64/python2.7/SocketServer.py\", line 649, in __init__\r\n    self.handle()\r\n  File \"/usr/lib/python2.7/site-packages/werkzeug/serving.py\", line 216, in handle\r\n    rv = BaseHTTPRequestHandler.handle(self)\r\n  File \"/usr/lib64/python2.7/BaseHTTPServer.py\", line 340, in handle\r\n    self.handle_one_request()\r\n  File \"/usr/lib/python2.7/site-packages/werkzeug/serving.py\", line 251, in handle_one_request\r\n    return self.run_wsgi()\r\n  File \"/usr/lib/python2.7/site-packages/werkzeug/serving.py\", line 193, in run_wsgi\r\n    execute(self.server.app)\r\n  File \"/usr/lib/python2.7/site-packages/werkzeug/serving.py\", line 181, in execute\r\n    application_iter = app(environ, start_response)\r\n  File \"/usr/lib64/python2.7/site-packages/flask/app.py\", line 2000, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/usr/lib64/python2.7/site-packages/flask/app.py\", line 1991, in wsgi_app\r\n    response = self.make_response(self.handle_exception(e))\r\n  File \"/usr/lib64/python2.7/site-packages/flask/app.py\", line 1559, in handle_exception\r\n    handler = self._find_error_handler(InternalServerError())\r\n  File \"/usr/lib64/python2.7/site-packages/flask/app.py\", line 1476, in _find_error_handler\r\n    .get(code))\r\n  File \"/usr/lib64/python2.7/site-packages/flask/app.py\", line 1465, in find_handler\r\n    handler = handler_map.get(cls)\r\nAttributeError: 'function' object has no attribute 'get'\r\n```\r\n\r\nIt''s python 2.7.5, and Flask 0.11.1\r\nThis also happens when I try to create some hosts."},"comment":{"url":"https://api.github.com/repos/Crapworks/RESTlos/issues/comments/239444537","html_url":"https://github.com/Crapworks/RESTlos/issues/5#issuecomment-239444537","issue_url":"https://api.github.com/repos/Crapworks/RESTlos/issues/5","id":239444537,"user":{"login":"petrovicboban","id":13204754,"avatar_url":"https://avatars.githubusercontent.com/u/13204754?v=3","gravatar_id":"","url":"https://api.github.com/users/petrovicboban","html_url":"https://github.com/petrovicboban","followers_url":"https://api.github.com/users/petrovicboban/followers","following_url":"https://api.github.com/users/petrovicboban/following{/other_user}","gists_url":"https://api.github.com/users/petrovicboban/gists{/gist_id}","starred_url":"https://api.github.com/users/petrovicboban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrovicboban/subscriptions","organizations_url":"https://api.github.com/users/petrovicboban/orgs","repos_url":"https://api.github.com/users/petrovicboban/repos","events_url":"https://api.github.com/users/petrovicboban/events{/privacy}","received_events_url":"https://api.github.com/users/petrovicboban/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T13:22:13Z","updated_at":"2016-08-12T13:22:13Z","body":"Hi,\r\nthere is no previous error, but the new one arised:\r\n\r\n\\# ./restlosapi.py \r\nTraceback (most recent call last):\r\n  File \"./restlosapi.py\", line 383, in <module>\r\n    app = NagiosAPI(\\__name\\__)\r\n  File \"./restlosapi.py\", line 343, in \\__init\\__\r\n    self._register_error_handler()\r\n  File \"./restlosapi.py\", line 374, in _register_error_handler\r\n    self.errorhandler(code)(self._error_handler)\r\n  File \"/usr/lib64/python2.7/site-packages/flask/app.py\", line 1175, in decorator\r\n    self._register_error_handler(None, code_or_exception, f)\r\nTypeError: _register_error_handler() takes exactly 1 argument (4 given)\r\n\r\n\r\n"}}
{"actor":{"display_login":"petrovicboban"}}