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

io.UnsupportedOperation when executing inside PyCharm #9

Open
CharlesB2 opened this issue Jun 18, 2020 · 0 comments
Open

io.UnsupportedOperation when executing inside PyCharm #9

CharlesB2 opened this issue Jun 18, 2020 · 0 comments

Comments

@CharlesB2
Copy link

If capturer is run inside the PyCharm IDE environment, the following error occurs:

Error
Traceback (most recent call last):
  File "/Users/charles3/prog/opu/python/test/test_logging.py", line 27, in test_log_debug
    with CaptureOutput() as capturer:
  File "/Users/charles3/prog/venvs/vopu/lib/python3.5/site-packages/capturer/__init__.py", line 233, in __init__
    self.stdout_stream = self.initialize_stream(sys.stdout, STDOUT_FD)
  File "/Users/charles3/prog/venvs/vopu/lib/python3.5/site-packages/capturer/__init__.py", line 267, in initialize_stream
    real_fd = file_obj.fileno()
io.UnsupportedOperation: fileno

Version 3.0, with PyCharm 2020.1, and Python 3.5

I used instead py.io.StdCaptureFD, and it worked without error

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

1 participant