{"action":"created","issue":{"url":"https://api.github.com/repos/rgalanakis/hostthedocs/issues/3","repository_url":"https://api.github.com/repos/rgalanakis/hostthedocs","labels_url":"https://api.github.com/repos/rgalanakis/hostthedocs/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/rgalanakis/hostthedocs/issues/3/comments","events_url":"https://api.github.com/repos/rgalanakis/hostthedocs/issues/3/events","html_url":"https://github.com/rgalanakis/hostthedocs/issues/3","id":176835730,"number":3,"title":"Cannot run under Python 3.5.2 - \"TypeError: 'generator' object is not subscriptable\"","user":{"login":"TAGC","id":1588951,"avatar_url":"https://avatars.githubusercontent.com/u/1588951?v=3","gravatar_id":"","url":"https://api.github.com/users/TAGC","html_url":"https://github.com/TAGC","followers_url":"https://api.github.com/users/TAGC/followers","following_url":"https://api.github.com/users/TAGC/following{/other_user}","gists_url":"https://api.github.com/users/TAGC/gists{/gist_id}","starred_url":"https://api.github.com/users/TAGC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TAGC/subscriptions","organizations_url":"https://api.github.com/users/TAGC/orgs","repos_url":"https://api.github.com/users/TAGC/repos","events_url":"https://api.github.com/users/TAGC/events{/privacy}","received_events_url":"https://api.github.com/users/TAGC/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-14T07:34:13Z","updated_at":"2016-09-16T23:17:28Z","closed_at":null,"body":"When running the server under Python 2.7.12, everything seems to work. When running it under 3.5.2 and trying to push documentation using the exact same commands, the server returns HTTP 500 (internal server error), and it prints this on console:\r\n\r\n```\r\n  File \"C:\\Users\\davidfallah\\AppData\\Local\\Programs\\Python\\Python35-32\\lib\\site-packages\\flask\\app.py\", line 1988, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"C:\\Users\\davidfallah\\AppData\\Local\\Programs\\Python\\Python35-32\\lib\\site-packages\\flask\\app.py\", line 1641, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"C:\\Users\\davidfallah\\AppData\\Local\\Programs\\Python\\Python35-32\\lib\\site-packages\\flask\\app.py\", line 1544, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"C:\\Users\\davidfallah\\AppData\\Local\\Programs\\Python\\Python35-32\\lib\\site-packages\\flask\\_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"C:\\Users\\davidfallah\\AppData\\Local\\Programs\\Python\\Python35-32\\lib\\site-packages\\flask\\app.py\", line 1639, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"C:\\Users\\davidfallah\\AppData\\Local\\Programs\\Python\\Python35-32\\lib\\site-packages\\flask\\app.py\", line 1625, in dispatch_request\r\n    return self.view_functions[rule.endpoint](**req.view_args)\r\n  File \"C:\\Users\\davidfallah\\Documents\\hostthedocs\\hostthedocs\\__init__.py\", line 22, in hmfd\r\n    request.files.values()[0].stream,\r\nTypeError: 'generator' object is not subscriptable\r\n```\r\n \r\nI changed `request.files.values()[0].stream` to `list(request.files.values())[0].stream` and this seems to make it work under both Python 2.7.12 and 3.5.2. I have not tested for other versions."},"comment":{"url":"https://api.github.com/repos/rgalanakis/hostthedocs/issues/comments/247730199","html_url":"https://github.com/rgalanakis/hostthedocs/issues/3#issuecomment-247730199","issue_url":"https://api.github.com/repos/rgalanakis/hostthedocs/issues/3","id":247730199,"user":{"login":"rgalanakis","id":1643233,"avatar_url":"https://avatars.githubusercontent.com/u/1643233?v=3","gravatar_id":"","url":"https://api.github.com/users/rgalanakis","html_url":"https://github.com/rgalanakis","followers_url":"https://api.github.com/users/rgalanakis/followers","following_url":"https://api.github.com/users/rgalanakis/following{/other_user}","gists_url":"https://api.github.com/users/rgalanakis/gists{/gist_id}","starred_url":"https://api.github.com/users/rgalanakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgalanakis/subscriptions","organizations_url":"https://api.github.com/users/rgalanakis/orgs","repos_url":"https://api.github.com/users/rgalanakis/repos","events_url":"https://api.github.com/users/rgalanakis/events{/privacy}","received_events_url":"https://api.github.com/users/rgalanakis/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T23:17:28Z","updated_at":"2016-09-16T23:17:28Z","body":"Ahaha, very nice find, and excellent report!\r\nYou can guess from the commit history I haven't used this in a while; I could fix this this weekend probably, unless you want to submit a PR (for which I would be much appreciative!)?"}}
{"actor":{"display_login":"rgalanakis"}}