You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
faulthandler stdlib module requires fileno on stdout #628
changed the title [-]AttributeError: 'FakeOutput' object has no attribute 'fileno'[/-][+]faulthandler stdlib module requires fileno on stdout[/+]on Aug 5, 2016
@Kashyap12, great to hear, and welcome! Would you like to take a look at this issue? You can contact me at [email protected] or on freenode in #bpython if you want to talk in depth about how to get started or you have questions, or you're welcome to ask them here; @goetzc can mute this thread if it gets long ;)
The first thing you'll want to do is to try out bpython; it'll be helpful context for this issue. You can either pip install it, which would work well enough to start working on this issue, or you can follow these instructions to get a version of the source code that's easy to change on your machine.
There are a few tasks I can think of for this issue:
Reproducing the problem by installing pygtgraph and bpython and getting this error again
Looking at the source code for faulthandler to figure out why it needs with a fileno on stdout
Figuring out what behavior was expected here: what does running this code in the regular Python interpreter do?
Trying out adding in a fileno method to stdout that returns the real stdout fileno and seeing how that works
Because faulthandler is part of the standard library, we should definitely try to find a solution that makes this work. I have some ideas (main one: making a new pipe that user Python code like this can write to that we'd combine with regular stdout.write output) but not enough information to know if that approach is necessary.
Hi @goetzc@thomasballinger , I tried to reproduce the same issue on my bpython set up, i.e. bpython version 0.16 on top of Python 2.7.6 /usr/bin/python , I pip installed pyqtgraph and then ran the below command on bpython : import pyqtgraph.examples
Activity
[-]AttributeError: 'FakeOutput' object has no attribute 'fileno'[/-][+]faulthandler stdlib module requires fileno on stdout[/+]thomasballinger commentedon Aug 5, 2016
It looks like this is due to
Someone should look into what faulthandler and see what it wanted to do with fileno to see what we should do about it.
Kashyap12 commentedon Nov 24, 2016
hi @thomasballinger , I am new to open source, would love to contribute
thomasballinger commentedon Nov 24, 2016
@Kashyap12, great to hear, and welcome! Would you like to take a look at this issue? You can contact me at [email protected] or on freenode in #bpython if you want to talk in depth about how to get started or you have questions, or you're welcome to ask them here; @goetzc can mute this thread if it gets long ;)
The first thing you'll want to do is to try out bpython; it'll be helpful context for this issue. You can either pip install it, which would work well enough to start working on this issue, or you can follow these instructions to get a version of the source code that's easy to change on your machine.
There are a few tasks I can think of for this issue:
Because faulthandler is part of the standard library, we should definitely try to find a solution that makes this work. I have some ideas (main one: making a new pipe that user Python code like this can write to that we'd combine with regular
stdout.writeoutput) but not enough information to know if that approach is necessary.Kashyap12 commentedon Nov 24, 2016
Hi @goetzc @thomasballinger , I tried to reproduce the same issue on my bpython set up, i.e.
bpython version 0.16 on top of Python 2.7.6 /usr/bin/python , I pip installed pyqtgraph and then ran the below command on bpython :
import pyqtgraph.examplesI got no error :)
goetzc commentedon Nov 24, 2016
FWIW, with bpython upgraded to 0.16 (and maintaining Python at 3.5.2) I don't get the error :)
Kashyap12 commentedon Nov 25, 2016
@goetzc so is this issue closed?
thomasballinger commentedon Nov 25, 2016
Oh great! It looks like this was fixed by #616.
Thanks for digging into this more @Kashyap12, and thanks @goetzc for reporting and testing again!
@Kashyap12, let me know if you're interested contributing more and would like suggestions for issues. bitesize would be a good place to start.