{"action":"closed","issue":{"url":"https://api.github.com/repos/zbears/pyvona/issues/31","repository_url":"https://api.github.com/repos/zbears/pyvona","labels_url":"https://api.github.com/repos/zbears/pyvona/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/zbears/pyvona/issues/31/comments","events_url":"https://api.github.com/repos/zbears/pyvona/issues/31/events","html_url":"https://github.com/zbears/pyvona/issues/31","id":184515475,"number":31,"title":"I get a TypeError in check_header_validity","user":{"login":"HeRo002","id":22969436,"avatar_url":"https://avatars.githubusercontent.com/u/22969436?v=3","gravatar_id":"","url":"https://api.github.com/users/HeRo002","html_url":"https://github.com/HeRo002","followers_url":"https://api.github.com/users/HeRo002/followers","following_url":"https://api.github.com/users/HeRo002/following{/other_user}","gists_url":"https://api.github.com/users/HeRo002/gists{/gist_id}","starred_url":"https://api.github.com/users/HeRo002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HeRo002/subscriptions","organizations_url":"https://api.github.com/users/HeRo002/orgs","repos_url":"https://api.github.com/users/HeRo002/repos","events_url":"https://api.github.com/users/HeRo002/events{/privacy}","received_events_url":"https://api.github.com/users/HeRo002/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-21T15:33:35Z","updated_at":"2016-10-21T15:53:52Z","closed_at":"2016-10-21T15:53:52Z","body":"Hi\r\n\r\nI am trying out your fascinating Pyvona package with this simple test: \r\n\r\n> import pyvona\r\n> \r\n> v = pyvona.create_voice(\"BvtHy743Ds1gPCq\", \"BvtHy743Ds1gPCq\")\r\n> v.speak(\"Hello World\")\r\n\r\nBut I get the TypeError below:\r\n\r\nNB!: When I signed up for Ivona it did not ask me to make 2 passwords, so I am using the same password as both ‘Access Key’ and ‘Secret Key’. \r\n\r\n(PS: I would love to make this message more readable, but I can't see any appropriate buttons here above the editor.)\r\n\r\n----Start of error message-----\r\n\"C:\\Program Files (x86)\\Python35-32\\python.exe\" D:/DataDoc/PycharmProjects/Pyvona-test.py\r\nTraceback (most recent call last):\r\n  File \"C:\\Program Files (x86)\\Python35-32\\lib\\site-packages\\requests\\utils.py\", line 796, in check_header_validity\r\n    if not pat.match(value):\r\nTypeError: expected string or bytes-like object\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"D:/DataDoc/PycharmProjects/Pyvona-test.py\", line 4, in <module>\r\n    v.speak(\"Hello World\")\r\n  File \"C:\\Program Files (x86)\\Python35-32\\lib\\site-packages\\pyvona.py\", line 148, in speak\r\n    self.fetch_voice_fp(text_to_speak, f)\r\n  File \"C:\\Program Files (x86)\\Python35-32\\lib\\site-packages\\pyvona.py\", line 123, in fetch_voice_fp\r\n    self._generate_payload(text_to_speak), self._region, self._host)\r\n  File \"C:\\Program Files (x86)\\Python35-32\\lib\\site-packages\\pyvona.py\", line 254, in _send_amazon_auth_packet_v4\r\n    return self._session.post(endpoint, data=request_parameters, headers=headers)\r\n  File \"C:\\Program Files (x86)\\Python35-32\\lib\\site-packages\\requests\\sessions.py\", line 522, in post\r\n    return self.request('POST', url, data=data, json=json, **kwargs)\r\n  File \"C:\\Program Files (x86)\\Python35-32\\lib\\site-packages\\requests\\sessions.py\", line 461, in request\r\n    prep = self.prepare_request(req)\r\n  File \"C:\\Program Files (x86)\\Python35-32\\lib\\site-packages\\requests\\sessions.py\", line 394, in prepare_request\r\n    hooks=merge_hooks(request.hooks, self.hooks),\r\n  File \"C:\\Program Files (x86)\\Python35-32\\lib\\site-packages\\requests\\models.py\", line 295, in prepare\r\n    self.prepare_headers(headers)\r\n  File \"C:\\Program Files (x86)\\Python35-32\\lib\\site-packages\\requests\\models.py\", line 409, in prepare_headers\r\n    check_header_validity(header)\r\n  File \"C:\\Program Files (x86)\\Python35-32\\lib\\site-packages\\requests\\utils.py\", line 800, in check_header_validity\r\n    \"not %s\" % (value, type(value)))\r\nrequests.exceptions.InvalidHeader: Header value 241 must be of type str or bytes, not <class 'int'>\r\n\r\nProcess finished with exit code 1\r\n----End of error message-----\r\n\r\nI am using Python 3.5.2 32-bit on PyCharm 2016.2.3 on Windows 10 64-bit. \r\n\r\nThank you for any help with this! \r\n\r\nPS: I also reported this on http://zacharybears.com/pyvona/#comment-8421\r\n\r\nHenrik R.\r\n"}}
{"actor":{"display_login":"garethellis0"}}