{"action":"created","issue":{"url":"https://api.github.com/repos/e-dard/flask-s3/issues/39","labels_url":"https://api.github.com/repos/e-dard/flask-s3/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/e-dard/flask-s3/issues/39/comments","events_url":"https://api.github.com/repos/e-dard/flask-s3/issues/39/events","html_url":"https://github.com/e-dard/flask-s3/issues/39","id":103468078,"number":39,"title":"socket.error when calling create_all()","user":{"login":"asib","id":8368500,"avatar_url":"https://avatars.githubusercontent.com/u/8368500?v=3","gravatar_id":"","url":"https://api.github.com/users/asib","html_url":"https://github.com/asib","followers_url":"https://api.github.com/users/asib/followers","following_url":"https://api.github.com/users/asib/following{/other_user}","gists_url":"https://api.github.com/users/asib/gists{/gist_id}","starred_url":"https://api.github.com/users/asib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asib/subscriptions","organizations_url":"https://api.github.com/users/asib/orgs","repos_url":"https://api.github.com/users/asib/repos","events_url":"https://api.github.com/users/asib/events{/privacy}","received_events_url":"https://api.github.com/users/asib/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/e-dard/flask-s3/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"SunDwarf","id":8783751,"avatar_url":"https://avatars.githubusercontent.com/u/8783751?v=3","gravatar_id":"","url":"https://api.github.com/users/SunDwarf","html_url":"https://github.com/SunDwarf","followers_url":"https://api.github.com/users/SunDwarf/followers","following_url":"https://api.github.com/users/SunDwarf/following{/other_user}","gists_url":"https://api.github.com/users/SunDwarf/gists{/gist_id}","starred_url":"https://api.github.com/users/SunDwarf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SunDwarf/subscriptions","organizations_url":"https://api.github.com/users/SunDwarf/orgs","repos_url":"https://api.github.com/users/SunDwarf/repos","events_url":"https://api.github.com/users/SunDwarf/events{/privacy}","received_events_url":"https://api.github.com/users/SunDwarf/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-08-27T09:34:25Z","updated_at":"2015-09-28T10:07:09Z","closed_at":null,"body":"I was trying to setup flask-s3 for my app but I kept getting a `socket.error` (either `broken pipe` or `connection reset by peer`) when running `flask_s3.create_all(app)` in a python shell as suggested in the docs. I had already made the bucket and was just trying to upload my static assets.\r\n\r\nThe fix appears to be to set the (undocumented) config variable `S3_REGION` to the region in which you created your bucket. However, this caused an error for me when the `create_all()` function tried to call `conn.create_bucket(bucket_name)`. By changing this call to a `get_bucket()` call, I was able to execute `create_all()` without error."},"comment":{"url":"https://api.github.com/repos/e-dard/flask-s3/issues/comments/143699396","html_url":"https://github.com/e-dard/flask-s3/issues/39#issuecomment-143699396","issue_url":"https://api.github.com/repos/e-dard/flask-s3/issues/39","id":143699396,"user":{"login":"asib","id":8368500,"avatar_url":"https://avatars.githubusercontent.com/u/8368500?v=3","gravatar_id":"","url":"https://api.github.com/users/asib","html_url":"https://github.com/asib","followers_url":"https://api.github.com/users/asib/followers","following_url":"https://api.github.com/users/asib/following{/other_user}","gists_url":"https://api.github.com/users/asib/gists{/gist_id}","starred_url":"https://api.github.com/users/asib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asib/subscriptions","organizations_url":"https://api.github.com/users/asib/orgs","repos_url":"https://api.github.com/users/asib/repos","events_url":"https://api.github.com/users/asib/events{/privacy}","received_events_url":"https://api.github.com/users/asib/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T10:07:09Z","updated_at":"2015-09-28T10:07:09Z","body":"Hi, sorry for taking so long.\r\n\r\nI've just tried to setup a simple app to illustrate this, but I've come up against a different problem. When I try to run `create_all()` I get `TypeError: decoding Unicode is not supported` with the following stack trace:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/Users/jacobfenton/Desktop/Python/create_all_test/venv/lib/python2.7/site-packages/flask_s3.py\", line 290, in create_all\r\n    _upload_files(s3, app, all_files, bucket_name)\r\n  File \"/Users/jacobfenton/Desktop/Python/create_all_test/venv/lib/python2.7/site-packages/flask_s3.py\", line 187, in _upload_files\r\n    bucket, hashes=hashes))\r\n  File \"/Users/jacobfenton/Desktop/Python/create_all_test/venv/lib/python2.7/site-packages/flask_s3.py\", line 144, in _write_files\r\n    asset_loc)\r\n  File \"/Users/jacobfenton/Desktop/Python/create_all_test/venv/lib/python2.7/site-packages/flask_s3.py\", line 133, in _static_folder_path\r\n    return six.u('%s/%s' % (static_url.rstrip('/'), rel_asset.lstrip('/')))\r\n  File \"/Users/jacobfenton/Desktop/Python/create_all_test/venv/lib/python2.7/site-packages/six.py\", line 621, in u\r\n    return unicode(s.replace(r'\\\\', r'\\\\\\\\'), \"unicode_escape\")\r\nTypeError: decoding Unicode is not supported\r\n```"}}