{"action":"created","issue":{"url":"https://api.github.com/repos/pyca/pyopenssl/issues/542","repository_url":"https://api.github.com/repos/pyca/pyopenssl","labels_url":"https://api.github.com/repos/pyca/pyopenssl/issues/542/labels{/name}","comments_url":"https://api.github.com/repos/pyca/pyopenssl/issues/542/comments","events_url":"https://api.github.com/repos/pyca/pyopenssl/issues/542/events","html_url":"https://github.com/pyca/pyopenssl/issues/542","id":177626708,"number":542,"title":"Regression: Version 16.1 doesn't work with Kodi","user":{"login":"candrews","id":194713,"avatar_url":"https://avatars.githubusercontent.com/u/194713?v=3","gravatar_id":"","url":"https://api.github.com/users/candrews","html_url":"https://github.com/candrews","followers_url":"https://api.github.com/users/candrews/followers","following_url":"https://api.github.com/users/candrews/following{/other_user}","gists_url":"https://api.github.com/users/candrews/gists{/gist_id}","starred_url":"https://api.github.com/users/candrews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/candrews/subscriptions","organizations_url":"https://api.github.com/users/candrews/orgs","repos_url":"https://api.github.com/users/candrews/repos","events_url":"https://api.github.com/users/candrews/events{/privacy}","received_events_url":"https://api.github.com/users/candrews/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-09-18T03:27:29Z","updated_at":"2016-09-20T13:59:48Z","closed_at":null,"body":"I'm a user of Kodi, not a developer, so I apologize ahead of time for the lack of detail in this bug report.\r\n\r\nVersions 15.1 and 16.0 work fine.\r\nVersion 0.16.1 does not work with Kodi. I've reported the issue to Kodi at http://trac.kodi.tv/ticket/16914\r\n\r\nIn short, when you try to perform an operation in Kodi that's implemented using urllib2, such as playing a Youtube video, playback fails, this error is sent to stdout:\r\n```\r\nextern \"Python\": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.\r\n```\r\nand this stack trace is logged:\r\n```\r\n23:06:45 T:139931166926592   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--\r\n                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!\r\n                                            Error Type: <class 'urllib2.URLError'>\r\n                                            Error Contents: <urlopen error [Errno 0] Error>\r\n                                            Traceback (most recent call last):\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/default.py\", line 7, in <module>\r\n                                                runner.run(__provider__)\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/resources/lib/kodion/runner.py\", line 32, in run\r\n                                                __RUNNER__.run(provider, context)\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_runner.py\", line 23, in run\r\n                                                results = provider.navigate(context)\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py\", line 123, in navigate\r\n                                                result = method(context, re_match)\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/resources/lib/kodion/register_provider_path.py\", line 12, in wrapper\r\n                                                return func(*args, **kwargs)\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/resources/lib/youtube/provider.py\", line 367, in on_play\r\n                                                return yt_play.play_video(self, context, re_match)\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/yt_play.py\", line 17, in play_video\r\n                                                video_streams = client.get_video_streams(context, video_id)\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/youtube.py\", line 80, in get_video_streams\r\n                                                video_streams = video_info.load_stream_infos(video_id)\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/video_info.py\", line 330, in load_stream_infos\r\n                                                return self._method_get_video_info(video_id)\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/video_info.py\", line 542, in _method_get_video_info\r\n                                                result = requests.get(url, params=params, headers=headers, verify=False, allow_redirects=True)\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py\", line 179, in get\r\n                                                return _request('GET', url, **kwargs)\r\n                                              File \"/home/mythtv/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py\", line 155, in _request\r\n                                                response = opener.open(request)\r\n                                              File \"/usr/lib64/python2.7/urllib2.py\", line 429, in open\r\n                                                response = self._open(req, data)\r\n                                              File \"/usr/lib64/python2.7/urllib2.py\", line 447, in _open\r\n                                                '_open', req)\r\n                                              File \"/usr/lib64/python2.7/urllib2.py\", line 407, in _call_chain\r\n                                                result = func(*args)\r\n                                              File \"/usr/lib64/python2.7/urllib2.py\", line 1241, in https_open\r\n                                                context=self._context)\r\n                                              File \"/usr/lib64/python2.7/urllib2.py\", line 1198, in do_open\r\n                                                raise URLError(err)\r\n                                            URLError: <urlopen error [Errno 0] Error>\r\n                                            -->End of Python script error report<--\r\n```"},"comment":{"url":"https://api.github.com/repos/pyca/pyopenssl/issues/comments/248309451","html_url":"https://github.com/pyca/pyopenssl/issues/542#issuecomment-248309451","issue_url":"https://api.github.com/repos/pyca/pyopenssl/issues/542","id":248309451,"user":{"login":"alex","id":772,"avatar_url":"https://avatars.githubusercontent.com/u/772?v=3","gravatar_id":"","url":"https://api.github.com/users/alex","html_url":"https://github.com/alex","followers_url":"https://api.github.com/users/alex/followers","following_url":"https://api.github.com/users/alex/following{/other_user}","gists_url":"https://api.github.com/users/alex/gists{/gist_id}","starred_url":"https://api.github.com/users/alex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex/subscriptions","organizations_url":"https://api.github.com/users/alex/orgs","repos_url":"https://api.github.com/users/alex/repos","events_url":"https://api.github.com/users/alex/events{/privacy}","received_events_url":"https://api.github.com/users/alex/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T13:59:48Z","updated_at":"2016-09-20T13:59:48Z","body":"Uhhh, sounds bad, I would definitely be opposed to a patch that did that."}}
{"actor":{"display_login":"alex"}}