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

Console throws error about wurlitzer on fresh install #8668

Closed
ptoche opened this issue Jan 29, 2019 · 18 comments
Closed

Console throws error about wurlitzer on fresh install #8668

ptoche opened this issue Jan 29, 2019 · 18 comments

Comments

@ptoche
Copy link

ptoche commented Jan 29, 2019

Can't get started anymore. This is the state of my Spyder console at startup. I have fresh-installed Python 3 from miniconda and Spyder 3. I'm on MacOS (latest). Any suggestions? Thanks!

Python 3.7.0 (default, Jun 28 2018, 07:39:16)myusername
Type "copyright", "credits" or "license" for more information.

IPython 7.2.0 -- An enhanced Interactive Python.
Error in callback <function sys_pipes_forever at 0x1215a3488> (for pre_execute):
Traceback (most recent call last):

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 320, in sys_pipes_forever
    _mighty_wurlitzer.__enter__()

  File "/Users/myusername/miniconda3/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 290, in pipes
    with w:

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 151, in __enter__
    pipe = self._setup_pipe('stdout')

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 100, in _setup_pipe
    real_fd = getattr(sys, '__%s__' % name).fileno()

AttributeError: 'NoneType' object has no attribute 'fileno'


Error in callback <function sys_pipes_forever at 0x1215a3488> (for pre_execute):
Error in callback <function sys_pipes_forever at 0x1215a3488> (for pre_execute):


Traceback (most recent call last):

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 320, in sys_pipes_forever
    _mighty_wurlitzer.__enter__()

  File "/Users/myusername/miniconda3/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 290, in pipes
    with w:

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 151, in __enter__
    pipe = self._setup_pipe('stdout')

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 100, in _setup_pipe
    real_fd = getattr(sys, '__%s__' % name).fileno()

AttributeError: 'NoneType' object has no attribute 'fileno'

Traceback (most recent call last):

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 320, in sys_pipes_forever
    _mighty_wurlitzer.__enter__()

  File "/Users/myusername/miniconda3/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 290, in pipes
    with w:

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 151, in __enter__
    pipe = self._setup_pipe('stdout')

  File "/Users/myusername/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 100, in _setup_pipe
    real_fd = getattr(sys, '__%s__' % name).fileno()

AttributeError: 'NoneType' object has no attribute 'fileno'
@ccordoba12
Copy link
Member

Thanks for reporting. We'll fix this in our next release (3.3.3) to be ready in a couple of days.

@ccordoba12
Copy link
Member

We have tests for this feature and they didn't detect your problem. So we relay on users to let us know about this kind of problems.

@ccordoba12 ccordoba12 changed the title console throws error on fresh install (MacOS, Python 3.7.0) Console throws error about wurlitzer on fresh install Feb 2, 2019
@namus
Copy link

namus commented Feb 14, 2019

I am using Spyder 3.3.3 installed through conda along with Python 3 in Mac OS X 10.14.3. On opening Spyder, I get the following error messages in the console. Same error message appears every time a script is run, or interactive mode is used. The scripts work fine, but the error message is rather annoying!

Error message:
Python 3.6.7 | packaged by conda-forge | (default, Nov 20 2018, 18:37:09)
Type "copyright", "credits" or "license" for more information.

IPython 7.2.0 -- An enhanced Interactive Python.
Error in callback <function sys_pipes_forever at 0x120553c80> (for pre_execute):
Traceback (most recent call last):

File "/Users/Suman/anaconda/lib/python3.6/site-packages/wurlitzer.py", line 320, in sys_pipes_forever
_mighty_wurlitzer.enter()

File "/Users/Suman/anaconda/lib/python3.6/contextlib.py", line 81, in enter
return next(self.gen)

File "/Users/Suman/anaconda/lib/python3.6/site-packages/wurlitzer.py", line 290, in pipes
with w:

File "/Users/Suman/anaconda/lib/python3.6/site-packages/wurlitzer.py", line 151, in enter
pipe = self._setup_pipe('stdout')

File "/Users/Suman/anaconda/lib/python3.6/site-packages/wurlitzer.py", line 100, in _setup_pipe
real_fd = getattr(sys, '%s' % name).fileno()

AttributeError: 'NoneType' object has no attribute 'fileno'

@ccordoba12
Copy link
Member

@namus, what's your spyder-kernels version?

@namus
Copy link

namus commented Feb 14, 2019

@namus, what's your spyder-kernels version?

Name Version Build Channel
spyder 3.3.3 py36_0 conda-forge
spyder-kernels 0.4.2 py36_0 conda-forge
`

@ccordoba12
Copy link
Member

Ok, that's different from the issue you're having. Please open a new issue about it here

https://github.com/spyder-ide/spyder-kernels/issues

@saumil-sh
Copy link

Hello,
I am on a MacBook Pro, I installed everything though miniconda3 and opened Spyder after updating everything and I got following errors:

Python 3.7.3 (default, Mar 27 2019, 16:54:48)
Type "copyright", "credits" or "license" for more information.

IPython 7.5.0 -- An enhanced Interactive Python.
Error in callback <function sys_pipes_forever at 0x124160ae8> (for pre_execute):
Traceback (most recent call last):

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 320, in sys_pipes_forever
    _mighty_wurlitzer.__enter__()

  File "/miniconda3/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 290, in pipes
    with w:

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 151, in __enter__
    pipe = self._setup_pipe('stdout')

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 100, in _setup_pipe
    real_fd = getattr(sys, '__%s__' % name).fileno()

AttributeError: 'NoneType' object has no attribute 'fileno'




Error in callback <function sys_pipes_forever at 0x124160ae8> (for pre_execute):
Error in callback <function sys_pipes_forever at 0x124160ae8> (for pre_execute):


Traceback (most recent call last):

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 320, in sys_pipes_forever
    _mighty_wurlitzer.__enter__()

  File "/miniconda3/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 290, in pipes
    with w:

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 151, in __enter__
    pipe = self._setup_pipe('stdout')

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 100, in _setup_pipe
    real_fd = getattr(sys, '__%s__' % name).fileno()

AttributeError: 'NoneType' object has no attribute 'fileno'

Traceback (most recent call last):

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 320, in sys_pipes_forever
    _mighty_wurlitzer.__enter__()

  File "/miniconda3/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 290, in pipes
    with w:

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 151, in __enter__
    pipe = self._setup_pipe('stdout')

  File "/miniconda3/lib/python3.7/site-packages/wurlitzer.py", line 100, in _setup_pipe
    real_fd = getattr(sys, '__%s__' % name).fileno()

AttributeError: 'NoneType' object has no attribute 'fileno'

macOS Mojave version 10.14.5 (18F132)

spyder                    3.3.4                    py37_0  
spyder-kernels            0.5.0                    py37_0  
wurlitzer                 1.0.2                    py37_0

@alexandrugris
Copy link

I have the same with Spyder 4.

@yvonneyang1
Copy link

yvonneyang1 commented Jan 10, 2020

same issues on Mac Catalina 10.15.2
Spyder version 3.3.6
Python 3.7.0

@ptoche
Copy link
Author

ptoche commented Jan 22, 2020

It just suddenly came back. Latest MacOS/Python/Spyder.

Edit: Came and went. 👍

@vibhormehta
Copy link

vibhormehta commented Feb 12, 2020

I am facing the same problem with my mac. This stopped showing up. But this error is back now.

Edit: This was fixed (temporarily?) by running

conda update anaconda

@linmiepii
Copy link

I met the same problem with fresh install of Spyder 4

@ptoche
Copy link
Author

ptoche commented Apr 27, 2020

I am facing the same problem with my mac. This stopped showing up. But this error is back now.

Edit: This was fixed (temporarily?) by running

conda update anaconda

Do you mean?

conda update conda
conda update -all

@ptoche
Copy link
Author

ptoche commented Apr 27, 2020

Getting it again after a full update. MacOS Catalina 10.15.4. Spyder 4.1.2. Python 3.7.7 64-bit | Qt 5.9.6 | PyQt5 5.9.2 | Darwin 19.4.0

    Python 3.7.7 (default, Mar 26 2020, 10:32:53) 
    Type "copyright", "credits" or "license" for more information.

    IPython 7.13.0 -- An enhanced Interactive Python.

    Restarting kernel... 


     Error in callback <function sys_pipes_forever at 0x112a31050> (for pre_execute):


    Traceback (most recent call last):

      File "/Users/username/miniconda/lib/python3.7/site-packages/wurlitzer.py", line 339, in sys_pipes_forever
        _mighty_wurlitzer.__enter__()

      File "/Users/username/miniconda/lib/python3.7/contextlib.py", line 112, in __enter__
        return next(self.gen)

      File "/Users/username/miniconda/lib/python3.7/site-packages/wurlitzer.py", line 306, in pipes
        with w:

      File "/Users/username/miniconda/lib/python3.7/site-packages/wurlitzer.py", line 158, in __enter__
        pipe = self._setup_pipe('stdout')

      File "/Users/username/miniconda/lib/python3.7/site-packages/wurlitzer.py", line 107, in _setup_pipe
        real_fd = getattr(sys, '__%s__' % name).fileno()

    AttributeError: 'NoneType' object has no attribute 'fileno'

@ptoche
Copy link
Author

ptoche commented Apr 27, 2020

Seems to be solved with:

conda install -c conda-forge wurlitzer

@CommonClimate
Copy link

Yup, still an issue for me despite installing the latest wurlitzer (from conda-forge, as above).
Configuration:

  • Mac OS 10.15.4
  • Spyder 4.1.2
  • Python 3.7.7 (installed through miniconda)
  • Wurlitzer 2.0.0

Any solution welcome

@yotamcons
Copy link

I have the same issue..

Mac OS 10.15.4
Spyder 3.3.6
Python 3.6.10
Wurlitzer 2.0.0

A strange phenomena that might make solving this much harder: After I close Spyder and reopen everything works well - but if I log out and log back in it comes back

@federicoVisi
Copy link

I had the same issue on MacOS and figured out it occurs just when launching Spyder from Terminal, no issue if Spyder is launched from Anaconda Navigator.

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

No branches or pull requests