{"action":"created","issue":{"url":"https://api.github.com/repos/scrapy/scrapyd/issues/145","repository_url":"https://api.github.com/repos/scrapy/scrapyd","labels_url":"https://api.github.com/repos/scrapy/scrapyd/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/scrapy/scrapyd/issues/145/comments","events_url":"https://api.github.com/repos/scrapy/scrapyd/issues/145/events","html_url":"https://github.com/scrapy/scrapyd/issues/145","id":155193336,"number":145,"title":"Can't deploy scrapy to scrapyd server","user":{"login":"artyomboyko","id":631173,"avatar_url":"https://avatars.githubusercontent.com/u/631173?v=3","gravatar_id":"","url":"https://api.github.com/users/artyomboyko","html_url":"https://github.com/artyomboyko","followers_url":"https://api.github.com/users/artyomboyko/followers","following_url":"https://api.github.com/users/artyomboyko/following{/other_user}","gists_url":"https://api.github.com/users/artyomboyko/gists{/gist_id}","starred_url":"https://api.github.com/users/artyomboyko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artyomboyko/subscriptions","organizations_url":"https://api.github.com/users/artyomboyko/orgs","repos_url":"https://api.github.com/users/artyomboyko/repos","events_url":"https://api.github.com/users/artyomboyko/events{/privacy}","received_events_url":"https://api.github.com/users/artyomboyko/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scrapy/scrapyd/labels/insufficient%20info","name":"insufficient info","color":"e9d0c4"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-17T07:28:27Z","updated_at":"2016-05-20T11:04:14Z","closed_at":null,"body":"I'm trying to deploy spider created via [Portia][1]. Portia, scrapyd - all is latest versions.\r\n\r\nI'm running **scrapyd** server just by command:\r\n\r\n    scrapyd\r\n\r\nI'm getting this result on my machine locally:\r\n\r\n    $> cd PROJECT_PATH_HERE;\r\n    $> scrapyd-deploy\r\n    Packing version 1463420166\r\n    Deploying to project \"retail\" in http://X.X.X.X:6800/addversion.json\r\n    Server response (200):\r\n    {\"status\": \"error\", \"message\": \"AttributeError: 'list' object has no attribute 'iteritems'\", \"node_name\": \"vaua0048313.online-vm.com\"}\r\n\r\nOn the server side (**Ubuntu 12.04.5 LTS**):\r\n\r\n    root@server:~# scrapyd\r\n    2016-05-16 17:35:42+0000 [-] Log opened.\r\n    2016-05-16 17:35:42+0000 [-] twistd 16.1.1 (/usr/bin/python 2.7.3) starting up.\r\n    2016-05-16 17:35:42+0000 [-] reactor class: twisted.internet.epollreactor.EPollReactor.\r\n    2016-05-16 17:35:42+0000 [-] Site starting on 6800\r\n    2016-05-16 17:35:42+0000 [-] Starting factory <twisted.web.server.Site instance at 0x2f5d950>\r\n    2016-05-16 17:35:42+0000 [Launcher] Scrapyd 1.1.0 started: max_proc=12, runner='scrapyd.runner'\r\n    2016-05-16 17:36:06+0000 [_GenericHTTPChannelProtocol,0,78.111.181.96] Unhandled Error\r\n            Traceback (most recent call last):\r\n              File \"/usr/local/lib/python2.7/dist-packages/twisted/web/http.py\", line 1767, in allContentReceived\r\n                req.requestReceived(command, path, version)\r\n              File \"/usr/local/lib/python2.7/dist-packages/twisted/web/http.py\", line 768, in requestReceived\r\n                self.process()\r\n              File \"/usr/local/lib/python2.7/dist-packages/twisted/web/server.py\", line 183, in process\r\n                self.render(resrc)\r\n              File \"/usr/local/lib/python2.7/dist-packages/twisted/web/server.py\", line 234, in render\r\n                body = resrc.render(self)\r\n            --- <exception caught here> ---\r\n              File \"/usr/local/lib/python2.7/dist-packages/scrapyd/webservice.py\", line 17, in render\r\n                return JsonResource.render(self, txrequest)\r\n              File \"/usr/local/lib/python2.7/dist-packages/scrapyd/utils.py\", line 19, in render\r\n                r = resource.Resource.render(self, txrequest)\r\n              File \"/usr/local/lib/python2.7/dist-packages/twisted/web/resource.py\", line 250, in render\r\n                return m(request)\r\n              File \"/usr/local/lib/python2.7/dist-packages/scrapyd/webservice.py\", line 79, in render_POST\r\n                spiders = get_spider_list(project, version=version)\r\n              File \"/usr/local/lib/python2.7/dist-packages/scrapyd/utils.py\", line 116, in get_spider_list\r\n                raise RuntimeError(msg.splitlines()[-1])\r\n            exceptions.RuntimeError: AttributeError: 'list' object has no attribute 'iteritems'\r\n    \r\n    2016-05-16 17:36:06+0000 [-] \"78.111.181.96\" - - [16/May/2016:17:36:05 +0000] \"POST /addversion.json HTTP/1.1\" 200 135 \"-\" \"Python-urllib/2.7\"\r\n\r\nWhat am I doing wrong ?\r\n\r\n  [1]: https://portia.readthedocs.io/en/latest/projects.html#deployment\r\n"},"comment":{"url":"https://api.github.com/repos/scrapy/scrapyd/issues/comments/220578022","html_url":"https://github.com/scrapy/scrapyd/issues/145#issuecomment-220578022","issue_url":"https://api.github.com/repos/scrapy/scrapyd/issues/145","id":220578022,"user":{"login":"Digenis","id":2230180,"avatar_url":"https://avatars.githubusercontent.com/u/2230180?v=3","gravatar_id":"","url":"https://api.github.com/users/Digenis","html_url":"https://github.com/Digenis","followers_url":"https://api.github.com/users/Digenis/followers","following_url":"https://api.github.com/users/Digenis/following{/other_user}","gists_url":"https://api.github.com/users/Digenis/gists{/gist_id}","starred_url":"https://api.github.com/users/Digenis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Digenis/subscriptions","organizations_url":"https://api.github.com/users/Digenis/orgs","repos_url":"https://api.github.com/users/Digenis/repos","events_url":"https://api.github.com/users/Digenis/events{/privacy}","received_events_url":"https://api.github.com/users/Digenis/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T11:04:14Z","updated_at":"2016-05-20T11:04:14Z","body":"Perhaps you have some broken settings\r\nin combination with a local_settings file that doesn't get deployed to scrapyd\r\n(this can explain the different errors).\r\nHowever because of https://github.com/scrapy/scrapyd/issues/145#issuecomment-219675386\r\nI don't think we should start digging in scrapyd yet.\r\nPlease make it work out of scrapyd first\r\nwith the help of the portia community where needed.\r\nThen if it still doesn't work on scrapyd, we can look into it.\r\n"}}
{"actor":{"display_login":"Digenis"}}