Closed sebma closed 7 years ago
Sorry, I have no idea why this is happening.
@minrk or @takluyver, have you seen this error before?
Does spyder do anything to redirect standard streams? I wonder if the kernel is trying to inherit its standard streams from the parent process, and picking up something that's not a valid fd.
Can you please fix this issue before releasing Spyder 3.2 because I do need the IPython console for debugging with Spyder ?
@takluyver I think I understand a little bit of your question. If I run Spyder with this command :
spyder &
exit
the IPython console cannot start, but if I run it with this command spyder &
without existing the calling shell before Spyder+IPython finishes to start, it seems to work.
Hope this helps you fixing this.
Does spyder do anything to redirect standard streams?
Yes, we redirect the kernel stderr output to a file, as can be seen here
https://github.com/spyder-ide/spyder/blob/master/spyder/plugins/ipythonconsole.py#L1293
but we haven't seen other errors as the one reported here, so I don't know why this is happening.
@sebma, I can't reproduce this on Linux and I don't even know how to address this, sorry.
But at least you have a temporary solution.
Where do you run those lines? Are you typing them into a shell, or using them in some sort of script?
@takluyver On macos, I'm typing them into a shell
OK, so you close the shell, which presumably results in the terminal it's running in being cleaned up. So the standard stream fds Spyder is using are invalidated. I can kind of reproduce something similar with the Qtconsole on Linux - calling sys.__stderr__.flush()
after exiting the terminal I launched it from gives me [Errno 5] Input/output error
.
It's up to @ccordoba12 , but I'd be inclined to compare the situation to this old joke:
Doctor, it hurts when I do this!
Don't do that.
@takluyver, yep, that's my feeling about this situation ;-)
@sebma, I don't know how we could fix this because if you abruptly remove the carpet under which Spyder is running, then things are expected to fail.
@takluyver, thanks a lot for chiming in!
I don't want any spyder on my carpet ! Let them do what they were created for : catching mosquitoes from their web and eating them. LOL
Description of your problem
IPython console fails to start
What steps will reproduce the problem?
**What is the expected output?
IPython console start
What do you see instead?**
Please provide any additional information below
Versions and main components
Dependencies
jedi =0.9.0 : 0.9.0 (OK) matplotlib >=1.0 : 2.0.2 (OK) nbconvert >=4.0 : 5.2.1 (OK) numpy >=1.7 : 1.13.0 (OK) pandas >=0.13.1 : 0.20.2 (OK) pep8 >=0.6 : 1.7.0 (OK) psutil >=0.3 : 5.2.2 (OK) pyflakes >=0.6.0 : 1.5.0 (OK) pygments >=2.0 : 2.2.0 (OK) pylint >=0.25 : 1.6.4 (OK) qtconsole >=4.2.0: 4.3.0 (OK) rope >=0.9.4 : 0.9.4-1 (OK) sphinx >=0.6.6 : 1.6.2 (OK) sympy >=0.7.3 : None (NOK)