{"action":"created","issue":{"url":"https://api.github.com/repos/PidgeyL/cve-search/issues/108","labels_url":"https://api.github.com/repos/PidgeyL/cve-search/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/PidgeyL/cve-search/issues/108/comments","events_url":"https://api.github.com/repos/PidgeyL/cve-search/issues/108/events","html_url":"https://github.com/PidgeyL/cve-search/issues/108","id":104538349,"number":108,"title":"Traceback on some CVEs","user":{"login":"tunkaflux","id":4215920,"avatar_url":"https://avatars.githubusercontent.com/u/4215920?v=3","gravatar_id":"","url":"https://api.github.com/users/tunkaflux","html_url":"https://github.com/tunkaflux","followers_url":"https://api.github.com/users/tunkaflux/followers","following_url":"https://api.github.com/users/tunkaflux/following{/other_user}","gists_url":"https://api.github.com/users/tunkaflux/gists{/gist_id}","starred_url":"https://api.github.com/users/tunkaflux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunkaflux/subscriptions","organizations_url":"https://api.github.com/users/tunkaflux/orgs","repos_url":"https://api.github.com/users/tunkaflux/repos","events_url":"https://api.github.com/users/tunkaflux/events{/privacy}","received_events_url":"https://api.github.com/users/tunkaflux/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PidgeyL/cve-search/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"PidgeyL","id":8830839,"avatar_url":"https://avatars.githubusercontent.com/u/8830839?v=3","gravatar_id":"","url":"https://api.github.com/users/PidgeyL","html_url":"https://github.com/PidgeyL","followers_url":"https://api.github.com/users/PidgeyL/followers","following_url":"https://api.github.com/users/PidgeyL/following{/other_user}","gists_url":"https://api.github.com/users/PidgeyL/gists{/gist_id}","starred_url":"https://api.github.com/users/PidgeyL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PidgeyL/subscriptions","organizations_url":"https://api.github.com/users/PidgeyL/orgs","repos_url":"https://api.github.com/users/PidgeyL/repos","events_url":"https://api.github.com/users/PidgeyL/events{/privacy}","received_events_url":"https://api.github.com/users/PidgeyL/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-09-02T17:56:17Z","updated_at":"2015-09-03T17:45:18Z","closed_at":"2015-09-03T17:25:03Z","body":"Hello,\r\n\r\nI've installed cve-search, updated using \"python3 ./db_updater.py -c -i -v\" and I sometimes get the below error message in the web interface now. \r\n\r\nFor instance opening CVE-2015-4498 gives:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1836, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1820, in wsgi_app\r\n    response = self.make_response(self.handle_exception(e))\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1403, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1817, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1477, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1381, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1475, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1461, in dispatch_request\r\n    return self.view_functions[rule.endpoint](**req.view_args)\r\n  File \"/home/laurens/Source/cve-search/web/index.py\", line 426, in cve\r\n    cve = cvesp.getcve(cveid=cveid)\r\n  File \"/home/laurens/Source/cve-search/lib/CVEs.py\", line 104, in getcve\r\n    vulconf.append({'id': conf, 'title': self.getcpe(cpeid=conf)})\r\n  File \"/home/laurens/Source/cve-search/lib/CVEs.py\", line 70, in getcpe\r\n    e = db.getCPE(cpeid)\r\n  File \"/home/laurens/Source/cve-search/lib/DatabaseLayer.py\", line 70, in getCPE\r\n    return sanitize(colCPE.find_one({\"id\": id}))\r\n  File \"/home/laurens/Source/cve-search/lib/DatabaseLayer.py\", line 32, in sanitize\r\n    if \"_id\" in x: x.pop(\"_id\")\r\nTypeError: argument of type 'NoneType' is not iterable\r\n```\r\nSame for CVE-2015-5433:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1836, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1820, in wsgi_app\r\n    response = self.make_response(self.handle_exception(e))\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1403, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1817, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1477, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1381, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1475, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"/usr/local/lib/python3.4/dist-packages/flask/app.py\", line 1461, in dispatch_request\r\n    return self.view_functions[rule.endpoint](**req.view_args)\r\n  File \"/home/laurens/Source/cve-search/web/index.py\", line 426, in cve\r\n    cve = cvesp.getcve(cveid=cveid)\r\n  File \"/home/laurens/Source/cve-search/lib/CVEs.py\", line 104, in getcve\r\n    vulconf.append({'id': conf, 'title': self.getcpe(cpeid=conf)})\r\n  File \"/home/laurens/Source/cve-search/lib/CVEs.py\", line 70, in getcpe\r\n    e = db.getCPE(cpeid)\r\n  File \"/home/laurens/Source/cve-search/lib/DatabaseLayer.py\", line 70, in getCPE\r\n    return sanitize(colCPE.find_one({\"id\": id}))\r\n  File \"/home/laurens/Source/cve-search/lib/DatabaseLayer.py\", line 32, in sanitize\r\n    if \"_id\" in x: x.pop(\"_id\")\r\nTypeError: argument of type 'NoneType' is not iterable\r\n```\r\n\r\nOther CVEs work and I can't immediately see a difference between the 2...\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/PidgeyL/cve-search/issues/comments/137525091","html_url":"https://github.com/PidgeyL/cve-search/issues/108#issuecomment-137525091","issue_url":"https://api.github.com/repos/PidgeyL/cve-search/issues/108","id":137525091,"user":{"login":"tunkaflux","id":4215920,"avatar_url":"https://avatars.githubusercontent.com/u/4215920?v=3","gravatar_id":"","url":"https://api.github.com/users/tunkaflux","html_url":"https://github.com/tunkaflux","followers_url":"https://api.github.com/users/tunkaflux/followers","following_url":"https://api.github.com/users/tunkaflux/following{/other_user}","gists_url":"https://api.github.com/users/tunkaflux/gists{/gist_id}","starred_url":"https://api.github.com/users/tunkaflux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunkaflux/subscriptions","organizations_url":"https://api.github.com/users/tunkaflux/orgs","repos_url":"https://api.github.com/users/tunkaflux/repos","events_url":"https://api.github.com/users/tunkaflux/events{/privacy}","received_events_url":"https://api.github.com/users/tunkaflux/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T17:45:18Z","updated_at":"2015-09-03T17:45:18Z","body":"I think you made a typo in \"db_mgmt.py\" around line 225 :) it says \"dbLayerr\" instead of \"dbLayer\" which makes the script fail. Should I open a new bug for that?"}}