{"action":"created","issue":{"url":"https://api.github.com/repos/TileStache/TileStache/issues/216","repository_url":"https://api.github.com/repos/TileStache/TileStache","labels_url":"https://api.github.com/repos/TileStache/TileStache/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/TileStache/TileStache/issues/216/comments","events_url":"https://api.github.com/repos/TileStache/TileStache/issues/216/events","html_url":"https://github.com/TileStache/TileStache/issues/216","id":86761069,"number":216,"title":"Seeding to S3 causes error","user":{"login":"jak2030","id":1641058,"avatar_url":"https://avatars.githubusercontent.com/u/1641058?v=3","gravatar_id":"","url":"https://api.github.com/users/jak2030","html_url":"https://github.com/jak2030","followers_url":"https://api.github.com/users/jak2030/followers","following_url":"https://api.github.com/users/jak2030/following{/other_user}","gists_url":"https://api.github.com/users/jak2030/gists{/gist_id}","starred_url":"https://api.github.com/users/jak2030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jak2030/subscriptions","organizations_url":"https://api.github.com/users/jak2030/orgs","repos_url":"https://api.github.com/users/jak2030/repos","events_url":"https://api.github.com/users/jak2030/events{/privacy}","received_events_url":"https://api.github.com/users/jak2030/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-06-09T22:52:32Z","updated_at":"2016-06-27T19:59:35Z","closed_at":null,"body":"Trying to seed to s3, i.e.:\r\n\r\n`./scripts/tilestache-seed.py -c ./TileStache/tilestache.cfg -e geojson 10 11 12 -l database_table -b 33.6478079 -84.5518189 33.8876179 -84.289389  --to-s3 access secret bucket`\r\n\r\nYields:\r\n\r\n```\r\n1 of 3543... Failed database_table/10/271/409.geojson, will try no more.\r\nTraceback (most recent call last):\r\n  File \"./scripts/tilestache-seed.py\", line 344, in <module>\r\n    layer, coord, extension, options.ignore_cached)\r\n  File \"/home/ubuntu/.virtualenvs/some_env/local/lib/python2.7/site-packages/TileStache-1.50.1-py2.7.egg/TileStache/__init__.py\", line 66, in getTile\r\n    status_code, headers, body = layer.getTileResponse(coord, extension, ignore_cached)\r\n  File \"/home/ubuntu/.virtualenvs/some_env/local/lib/python2.7/site-packages/TileStache-1.50.1-py2.7.egg/TileStache/Core.py\", line 386, in getTileResponse\r\n    body = cache.read(self, coord, format)\r\n  File \"/home/ubuntu/.virtualenvs/some_env/local/lib/python2.7/site-packages/TileStache-1.50.1-py2.7.egg/TileStache/S3.py\", line 118, in read\r\n    key = self.bucket.get_key(key_name)\r\n  File \"/home/ubuntu/.virtualenvs/some_env/local/lib/python2.7/site-packages/boto/s3/bucket.py\", line 192, in get_key\r\n    key, resp = self._get_key_internal(key_name, headers, query_args_l)\r\n  File \"/home/ubuntu/.virtualenvs/some_env/local/lib/python2.7/site-packages/boto/s3/bucket.py\", line 199, in _get_key_internal\r\n    query_args=query_args)\r\n  File \"/home/ubuntu/.virtualenvs/some_env/local/lib/python2.7/site-packages/boto/s3/connection.py\", line 664, in make_request\r\n    retry_handler=retry_handler\r\n  File \"/home/ubuntu/.virtualenvs/some_env/local/lib/python2.7/site-packages/boto/connection.py\", line 1071, in make_request\r\n    retry_handler=retry_handler)\r\n  File \"/home/ubuntu/.virtualenvs/some_env/local/lib/python2.7/site-packages/boto/connection.py\", line 1030, in _mexe\r\n    raise ex\r\nsocket.gaierror: [Errno -2] Name or service not known\r\n```\r\n\r\nI have tried a number of iterations (I have the AWS credentials stored as environment variables, etc.), but always come up with this error wherein seeding tries to call an s3 bucket rather than write to it first.\r\n\r\nI would assume the behavior should be writing geojson to s3 and then calling `cache.read` as it does in the traceback above. If I am misunderstanding the use of seed and this issue is not an actual bug, then clarification in the documentation would be amazing!\r\n\r\nThank you.\r\n"},"comment":{"url":"https://api.github.com/repos/TileStache/TileStache/issues/comments/228857528","html_url":"https://github.com/TileStache/TileStache/issues/216#issuecomment-228857528","issue_url":"https://api.github.com/repos/TileStache/TileStache/issues/216","id":228857528,"user":{"login":"mappingvermont","id":5845672,"avatar_url":"https://avatars.githubusercontent.com/u/5845672?v=3","gravatar_id":"","url":"https://api.github.com/users/mappingvermont","html_url":"https://github.com/mappingvermont","followers_url":"https://api.github.com/users/mappingvermont/followers","following_url":"https://api.github.com/users/mappingvermont/following{/other_user}","gists_url":"https://api.github.com/users/mappingvermont/gists{/gist_id}","starred_url":"https://api.github.com/users/mappingvermont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mappingvermont/subscriptions","organizations_url":"https://api.github.com/users/mappingvermont/orgs","repos_url":"https://api.github.com/users/mappingvermont/repos","events_url":"https://api.github.com/users/mappingvermont/events{/privacy}","received_events_url":"https://api.github.com/users/mappingvermont/received_events","type":"User","site_admin":false},"created_at":"2016-06-27T19:59:35Z","updated_at":"2016-06-27T19:59:35Z","body":"I've reread the tilestache docs, and I think it may have something to do with the bucket specified. I was using the following config: \r\n```\r\n{\r\n  \"cache\":\r\n  {\r\n    \"name\": \"S3\",\r\n    \"bucket\": \"wri-tiles/glad_test/dev\"\r\n  },\r\n  \"layers\":\r\n  {\r\n    \"tiles\": {\r\n      \"provider\" : {\r\n        \"name\": \"mapnik\", \"mapfile\": \"~/glad/glad-processing-gdal/tiles/config/africa/z_12.xml\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nAnd modified it to split the `bucket` object into `bucket` and `path`. Works great now.\r\n```\r\n  \"cache\":\r\n  {\r\n    \"name\": \"S3\",\r\n    \"bucket\": \"wri-tiles\",\r\n    \"path\": \"glad_test/dev\",\r\n    \"use_locks\": \"False\"\r\n  },\r\n  \"layers\":\r\n  {\r\n    \"tiles\": {\r\n      \"provider\" : {\r\n        \"name\": \"mapnik\", \"mapfile\": \"~/glad/glad-processing-gdal/tiles/config/africa/z_11.xml\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"mappingvermont"}}