Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colorama doesn't play well with pytest #82

Closed
rjmoggach opened this issue Jan 10, 2016 · 9 comments
Closed

colorama doesn't play well with pytest #82

rjmoggach opened this issue Jan 10, 2016 · 9 comments

Comments

@rjmoggach
Copy link

When I run tests on a package using colorama I get this lovely traceback:

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/local/lib/python2.7/site-packages/colorama/initialise.py", line 19, in reset_all
    AnsiToWin32(orig_stdout).reset_all()
  File "/usr/local/lib/python2.7/site-packages/colorama/ansitowin32.py", line 67, in __init__
    strip = conversion_supported or not is_a_tty(wrapped)
  File "/usr/local/lib/python2.7/site-packages/colorama/ansitowin32.py", line 17, in is_a_tty
    return hasattr(stream, 'isatty') and stream.isatty()
ValueError: I/O operation on closed file
Error in sys.exitfunc:

Removing colorama fixes the problem...

@wiggin15
Copy link
Collaborator

colorama 0.3.6 was released yesterday with a fix for this issue. Are you using the latest version?

@rjmoggach
Copy link
Author

Stack trace is from Travis running a Travis and py.test test so if you've pushed to PyPi then yes -

On Jan 10, 2016, at 5:35 AM, wiggin15 notifications@github.com wrote:

colorama 0.3.6 was released yesterday with a fix for this issue. Are you using the latest version?


Reply to this email directly or view it on GitHub.

@wiggin15
Copy link
Collaborator

The new version is on pypi and the line that fails:

 File "/usr/local/lib/python2.7/site-packages/colorama/ansitowin32.py", line 67, in __init__
    strip = conversion_supported or not is_a_tty(wrapped)

has been changed - it's not the same as the one on pypi. Can you please check the settings of your travis build to see why it's not using the latest version?

@blueyed
Copy link

blueyed commented Jan 22, 2016

Seems to be a dupe of #81 then really.

@blueyed
Copy link

blueyed commented Jan 22, 2016

Maybe you are seeing a new error now? #84

@wiggin15
Copy link
Collaborator

@robmoggach does this still reproduce? If it does, can you please link to the Travis build that fails?

@rjmoggach
Copy link
Author

Sorry no - removed it as a dependency for my rushed project

Robert Moggach
Sr. VFX Supervisor | Flame Artist
http://moggach.com
(310) 773-1793

On Jan 23, 2016, at 9:11 AM, wiggin15 notifications@github.com wrote:

@robmoggach does this still reproduce? If it does, can you please link to the Travis build that fails?


Reply to this email directly or view it on GitHub.

@wiggin15
Copy link
Collaborator

I see. Is it ok if I close this ticket, then? I can't reproduce this.

@rjmoggach
Copy link
Author

rjmoggach commented Jan 23, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants