{"action":"created","issue":{"url":"https://api.github.com/repos/rg3/youtube-dl/issues/10888","repository_url":"https://api.github.com/repos/rg3/youtube-dl","labels_url":"https://api.github.com/repos/rg3/youtube-dl/issues/10888/labels{/name}","comments_url":"https://api.github.com/repos/rg3/youtube-dl/issues/10888/comments","events_url":"https://api.github.com/repos/rg3/youtube-dl/issues/10888/events","html_url":"https://github.com/rg3/youtube-dl/pull/10888","id":181883875,"number":10888,"title":"Print traceback when raising UnavailableVideoError","user":{"login":"johnhawkinson","id":1270718,"avatar_url":"https://avatars.githubusercontent.com/u/1270718?v=3","gravatar_id":"","url":"https://api.github.com/users/johnhawkinson","html_url":"https://github.com/johnhawkinson","followers_url":"https://api.github.com/users/johnhawkinson/followers","following_url":"https://api.github.com/users/johnhawkinson/following{/other_user}","gists_url":"https://api.github.com/users/johnhawkinson/gists{/gist_id}","starred_url":"https://api.github.com/users/johnhawkinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnhawkinson/subscriptions","organizations_url":"https://api.github.com/users/johnhawkinson/orgs","repos_url":"https://api.github.com/users/johnhawkinson/repos","events_url":"https://api.github.com/users/johnhawkinson/events{/privacy}","received_events_url":"https://api.github.com/users/johnhawkinson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-09T12:16:18Z","updated_at":"2016-10-09T13:08:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rg3/youtube-dl/pulls/10888","html_url":"https://github.com/rg3/youtube-dl/pull/10888","diff_url":"https://github.com/rg3/youtube-dl/pull/10888.diff","patch_url":"https://github.com/rg3/youtube-dl/pull/10888.patch"},"body":"- [x] I am the original author of this code and I am willing to release it under [Unlicense](http://unlicense.org/)\r\n- [x] Improvement\r\n\r\n---\r\n\r\nAn OSError or IOError generally indicates something a little more\r\nwrong than a \"simple\" UnavailableVideoError, so print the actual\r\ntraceback that leads to the exception. Otherwise meaningful postmortem\r\ndebugging from a bug report is essentially infeasible.\r\n\r\nForked this pull request from #10876 (Fix UnavailableVideoError when writing to pipes) as requested by @yan12125."},"comment":{"url":"https://api.github.com/repos/rg3/youtube-dl/issues/comments/252485500","html_url":"https://github.com/rg3/youtube-dl/pull/10888#issuecomment-252485500","issue_url":"https://api.github.com/repos/rg3/youtube-dl/issues/10888","id":252485500,"user":{"login":"yan12125","id":1937689,"avatar_url":"https://avatars.githubusercontent.com/u/1937689?v=3","gravatar_id":"","url":"https://api.github.com/users/yan12125","html_url":"https://github.com/yan12125","followers_url":"https://api.github.com/users/yan12125/followers","following_url":"https://api.github.com/users/yan12125/following{/other_user}","gists_url":"https://api.github.com/users/yan12125/gists{/gist_id}","starred_url":"https://api.github.com/users/yan12125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yan12125/subscriptions","organizations_url":"https://api.github.com/users/yan12125/orgs","repos_url":"https://api.github.com/users/yan12125/repos","events_url":"https://api.github.com/users/yan12125/events{/privacy}","received_events_url":"https://api.github.com/users/yan12125/received_events","type":"User","site_admin":false},"created_at":"2016-10-09T13:08:20Z","updated_at":"2016-10-09T13:08:20Z","body":"Exception handling in youtube-dl is quite messy...\r\n\r\nThe best way to fix this is exploiting Python 3's exception chaining. [1] python-future [2] provides ```raise_from``` function for similar semantic on Python 2, but #10581 should be resolved first before using it.\r\n\r\nA possible short term fix is introducing the ```cause``` mechanism to ```UnavailableVideoError``` like ```ExtractorError```.\r\n\r\nAnyway the traceback should NOT be printed to stderr directly. Use ```self.to_stderr``` instead.\r\n\r\n[1] https://www.python.org/dev/peps/pep-3134/\r\n[2] https://github.com/PythonCharmers/python-future"}}
{"actor":{"display_login":"yan12125"}}