{"action":"created","issue":{"url":"https://api.github.com/repos/stevearc/pypicloud/issues/185","repository_url":"https://api.github.com/repos/stevearc/pypicloud","labels_url":"https://api.github.com/repos/stevearc/pypicloud/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/stevearc/pypicloud/issues/185/comments","events_url":"https://api.github.com/repos/stevearc/pypicloud/issues/185/events","html_url":"https://github.com/stevearc/pypicloud/pull/185","id":341391864,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNTQxNTcy","number":185,"title":"fix array exception when setting storage.cloud_front_key_file","user":{"login":"duckty","id":26257180,"node_id":"MDQ6VXNlcjI2MjU3MTgw","avatar_url":"https://avatars2.githubusercontent.com/u/26257180?v=4","gravatar_id":"","url":"https://api.github.com/users/duckty","html_url":"https://github.com/duckty","followers_url":"https://api.github.com/users/duckty/followers","following_url":"https://api.github.com/users/duckty/following{/other_user}","gists_url":"https://api.github.com/users/duckty/gists{/gist_id}","starred_url":"https://api.github.com/users/duckty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckty/subscriptions","organizations_url":"https://api.github.com/users/duckty/orgs","repos_url":"https://api.github.com/users/duckty/repos","events_url":"https://api.github.com/users/duckty/events{/privacy}","received_events_url":"https://api.github.com/users/duckty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-16T05:08:36Z","updated_at":"2018-07-16T05:12:03Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/stevearc/pypicloud/pulls/185","html_url":"https://github.com/stevearc/pypicloud/pull/185","diff_url":"https://github.com/stevearc/pypicloud/pull/185.diff","patch_url":"https://github.com/stevearc/pypicloud/pull/185.patch"},"body":"When I set storage.cloud_front_key_file = /etc/pypicloud/key.pem in config.ini ( key.pem was copied into /etc/pypicloud), start the app. I got the exception as below \r\n```\r\nLoading paste environment: config:/etc/pypicloud/config.ini\r\nINFO 2018-07-16 05:01:14,821 [botocore.vendored.requests.packages.urllib3.connectionpool] Starting new HTTPS connection (1): inspectorio-files-upload2.s3.amazonaws.com\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py\", line 247, in loadapp\r\n    return loadobj(APP, uri, name=name, **kw)\r\n  File \"/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py\", line 272, in loadobj\r\n    return context.create()\r\n  File \"/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py\", line 710, in create\r\n    return self.object_type.invoke(self)\r\n  File \"/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py\", line 146, in invoke\r\n    return fix_call(context.object, context.global_conf, **context.local_conf)\r\n  File \"/usr/local/lib/python3.5/dist-packages/paste/deploy/util.py\", line 58, in fix_call\r\n    reraise(*exc_info)\r\n  File \"/usr/local/lib/python3.5/dist-packages/paste/deploy/compat.py\", line 32, in reraise\r\n    raise e.with_traceback(tb)\r\n  File \"/usr/local/lib/python3.5/dist-packages/paste/deploy/util.py\", line 55, in fix_call\r\n    val = callable(*args, **kw)\r\n  File \"/usr/local/lib/python3.5/dist-packages/pypicloud/__init__.py\", line 146, in main\r\n    config.include('pypicloud')\r\n  File \"/usr/local/lib/python3.5/dist-packages/pyramid/config/__init__.py\", line 839, in include\r\n    c(configurator)\r\n  File \"/usr/local/lib/python3.5/dist-packages/pypicloud/__init__.py\", line 76, in includeme\r\n    config.include('pypicloud.cache')\r\n  File \"/usr/local/lib/python3.5/dist-packages/pyramid/config/__init__.py\", line 839, in include\r\n    c(configurator)\r\n  File \"/usr/local/lib/python3.5/dist-packages/pypicloud/cache/__init__.py\", line 27, in includeme\r\n    kwargs = cache_impl.configure(settings)\r\n  File \"/usr/local/lib/python3.5/dist-packages/pypicloud/cache/sql.py\", line 141, in configure\r\n    kwargs = super(SQLCache, cls).configure(settings)\r\n  File \"/usr/local/lib/python3.5/dist-packages/pypicloud/cache/base.py\", line 43, in configure\r\n    'storage': get_storage_impl(settings),\r\n  File \"/usr/local/lib/python3.5/dist-packages/pypicloud/storage/__init__.py\", line 22, in get_storage_impl\r\n    kwargs = storage_impl.configure(settings)\r\n  File \"/usr/local/lib/python3.5/dist-packages/pypicloud/storage/s3.py\", line 301, in configure\r\n    private_key, password=None, backend=default_backend())\r\n  File \"/usr/local/lib/python3.5/dist-packages/cryptography/hazmat/primitives/serialization.py\", line 20, in load_pem_private_key\r\n    return backend.load_pem_private_key(data, password)\r\n  File \"/usr/local/lib/python3.5/dist-packages/cryptography/hazmat/backends/openssl/backend.py\", line 1014, in load_pem_private_key\r\n    password,\r\n  File \"/usr/local/lib/python3.5/dist-packages/cryptography/hazmat/backends/openssl/backend.py\", line 1198, in _load_key\r\n    mem_bio = self._bytes_to_bio(data)\r\n  File \"/usr/local/lib/python3.5/dist-packages/cryptography/hazmat/backends/openssl/backend.py\", line 436, in _bytes_to_bio\r\n    data_char_p = self._ffi.new(\"char[]\", data)\r\nTypeError: initializer for ctype 'char[]' must be a bytes or list or tuple, not str\r\n```\r\nTo fix this, just open the pem file as binary.\r\n"},"comment":{"url":"https://api.github.com/repos/stevearc/pypicloud/issues/comments/405150534","html_url":"https://github.com/stevearc/pypicloud/pull/185#issuecomment-405150534","issue_url":"https://api.github.com/repos/stevearc/pypicloud/issues/185","id":405150534,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTE1MDUzNA==","user":{"login":"coveralls","id":2354108,"node_id":"MDQ6VXNlcjIzNTQxMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/2354108?v=4","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2018-07-16T05:12:03Z","updated_at":"2018-07-16T05:12:03Z","author_association":"NONE","body":"\n[![Coverage Status](https://coveralls.io/builds/17997391/badge)](https://coveralls.io/builds/17997391)\n\nCoverage remained the same at 83.466% when pulling **2c0c5f36071fbdbca1603920c9c94843573b8e2e on duckty:master** into **733ae129522ae68295929cb8923635fb4551efd0 on stevearc:master**.\n"}}
{"actor":{"display_login":"coveralls"}}