{"action":"created","issue":{"url":"https://api.github.com/repos/coala-analyzer/PyPrint/issues/23","repository_url":"https://api.github.com/repos/coala-analyzer/PyPrint","labels_url":"https://api.github.com/repos/coala-analyzer/PyPrint/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/coala-analyzer/PyPrint/issues/23/comments","events_url":"https://api.github.com/repos/coala-analyzer/PyPrint/issues/23/events","html_url":"https://github.com/coala-analyzer/PyPrint/issues/23","id":130796925,"number":23,"title":"ConsolePrinter : Fails to initialize colorama ","user":{"login":"abhsag24","id":8532031,"avatar_url":"https://avatars.githubusercontent.com/u/8532031?v=3","gravatar_id":"","url":"https://api.github.com/users/abhsag24","html_url":"https://github.com/abhsag24","followers_url":"https://api.github.com/users/abhsag24/followers","following_url":"https://api.github.com/users/abhsag24/following{/other_user}","gists_url":"https://api.github.com/users/abhsag24/gists{/gist_id}","starred_url":"https://api.github.com/users/abhsag24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhsag24/subscriptions","organizations_url":"https://api.github.com/users/abhsag24/orgs","repos_url":"https://api.github.com/users/abhsag24/repos","events_url":"https://api.github.com/users/abhsag24/events{/privacy}","received_events_url":"https://api.github.com/users/abhsag24/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-02T19:53:03Z","updated_at":"2016-02-03T07:37:48Z","closed_at":null,"body":"The test for coalaTest fail in coala-analyzer/coala giving traceback as\r\nhttp://pastebin.com/AC3u0Pk7 (ending of tests)\r\n\r\nand\r\n```\r\n  14/116 | coalaTest\r\ntest_fail_acquire_settings (__main__.coalaTest) ... ok\r\ntest_find_issues (__main__.coalaTest) ... ok\r\ntest_find_no_issues (__main__.coalaTest) ... FAIL\r\ntest_nonexistent (__main__.coalaTest) ... ERROR\r\ntest_tagging (__main__.coalaTest) ... ERROR\r\n\r\n======================================================================\r\nERROR: test_nonexistent (__main__.coalaTest)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/ubuntu/coala/coalib/tests/coalaTest.py\", line 47, in test_nonexistent\r\n    retval, output = execute_coala_ci((\"-c\", \"nonex\", \"test\"))\r\n  File \"/home/ubuntu/coala/coalib/tests/coalaTest.py\", line 32, in execute_coala_ci\r\n    retval = coala_ci.main()\r\n  File \"./coalib/coala_ci.py\", line 20, in main\r\n    print_results=print_results_no_input)\r\n  File \"./coalib/coala_main.py\", line 60, in run_coala\r\n    log_printer = log_printer or LogPrinter(ConsolePrinter())\r\n  File \"/home/ubuntu/.pyenv/versions/3.4.3/lib/python3.4/site-packages/pyprint/ConsolePrinter.py\", line 22, in __init__\r\n    colorama.init()\r\n  File \"/home/ubuntu/.pyenv/versions/3.4.3/lib/python3.4/site-packages/colorama/initialise.py\", line 42, in init\r\n    wrap_stream(orig_stderr, convert, strip, autoreset, wrap)\r\n  File \"/home/ubuntu/.pyenv/versions/3.4.3/lib/python3.4/site-packages/colorama/initialise.py\", line 76, in wrap_stream\r\n    convert=convert, strip=strip, autoreset=autoreset)\r\n  File \"/home/ubuntu/.pyenv/versions/3.4.3/lib/python3.4/site-packages/colorama/ansitowin32.py\", line 67, in __init__\r\n    strip = conversion_supported or (not wrapped.closed and not is_a_tty(wrapped))\r\n```\r\n\r\nas start (from circle-ci)"},"comment":{"url":"https://api.github.com/repos/coala-analyzer/PyPrint/issues/comments/179067574","html_url":"https://github.com/coala-analyzer/PyPrint/issues/23#issuecomment-179067574","issue_url":"https://api.github.com/repos/coala-analyzer/PyPrint/issues/23","id":179067574,"user":{"login":"AbdealiJK","id":2200743,"avatar_url":"https://avatars.githubusercontent.com/u/2200743?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdealiJK","html_url":"https://github.com/AbdealiJK","followers_url":"https://api.github.com/users/AbdealiJK/followers","following_url":"https://api.github.com/users/AbdealiJK/following{/other_user}","gists_url":"https://api.github.com/users/AbdealiJK/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdealiJK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdealiJK/subscriptions","organizations_url":"https://api.github.com/users/AbdealiJK/orgs","repos_url":"https://api.github.com/users/AbdealiJK/repos","events_url":"https://api.github.com/users/AbdealiJK/events{/privacy}","received_events_url":"https://api.github.com/users/AbdealiJK/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T07:37:48Z","updated_at":"2016-02-03T07:37:48Z","body":"Just thinking out loud here:\r\n(Because you mentioned that something works fine outside but throws errors inside coalaTest.py)\r\n\r\ncoalaTest works inside a `with retrieve_stdout() as stdout:` - which would mean that the `stdout` is replaced with a `StringIO` - which may not have the same properties like a normal stdout ?\r\n\r\ncolorama must be checking something here ? this may be causing the error ? (example: maybe colorama assumes that output for something is X or Y but StringIO gives None?)"}}