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

Event loop problem on Mac OS X #282

Closed
avigan opened this issue Nov 27, 2017 · 2 comments · Fixed by #290
Closed

Event loop problem on Mac OS X #282

avigan opened this issue Nov 27, 2017 · 2 comments · Fixed by #290

Comments

@avigan
Copy link

avigan commented Nov 27, 2017

I am trying to run jupyter console on Mac OS X (10.13.1) after an install of Python using anaconda and I get an error that seems related to ipykernel:

[17:00] ~ > jupyter console
ERROR:tornado.application:Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x10b2d1400>)
Traceback (most recent call last):
  File "/Users/avigan/anaconda3/lib/python3.6/site-packages/tornado/ioloop.py", line 605, in _run_callback
    ret = callback()
  File "/Users/avigan/anaconda3/lib/python3.6/site-packages/tornado/stack_context.py", line 277, in null_wrapper
    return fn(*args, **kwargs)
  File "/Users/avigan/anaconda3/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 265, in enter_eventloop
    self.eventloop(self)
  File "/Users/avigan/anaconda3/lib/python3.6/site-packages/ipykernel/eventloops.py", line 277, in loop_cocoa
    show.mainloop()
AttributeError: 'function' object has no attribute 'mainloop'
Jupyter console 5.2.0

Python 3.6.3 |Anaconda custom (64-bit)| (default, Nov  8 2017, 18:10:31)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]:

It does open a prompt at the end, but the problem is that I get weird behaviours in GUIs (e.g. in matplotlib) started from this prompt.

Also it really seems specific to Mac OS X, because with the same install on linux I have not such issue and because of the loop_cocoa line at the end.

@cradesto
Copy link

cradesto commented Dec 13, 2017

The same problem on OSX with python 2

jupyter-console            
Jupyter console 5.2.0

Python 2.7.14 |Anaconda, Inc.| (default, Dec  7 2017, 11:07:58) 
Type "copyright", "credits" or "license" for more information.

IPython 5.4.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.



In [1]: %matplotlib
Using matplotlib backend: MacOSX
ERROR:tornado.application:Exception in callback <functools.partial object at 0x108bf0f70>
Traceback (most recent call last):
  File "/Users/marat/miniconda/envs/astro/lib/python2.7/site-packages/tornado/ioloop.py", line 605, in _run_callback
    ret = callback()
  File "/Users/marat/miniconda/envs/astro/lib/python2.7/site-packages/tornado/stack_context.py", line 277, in null_wrapper
    return fn(*args, **kwargs)
  File "/Users/marat/miniconda/envs/astro/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 262, in enter_eventloop
    self.eventloop(self)
  File "/Users/marat/miniconda/envs/astro/lib/python2.7/site-packages/ipykernel/eventloops.py", line 278, in loop_cocoa
    show.mainloop()
AttributeError: 'function' object has no attribute 'mainloop'

@minrk
Copy link
Member

minrk commented Dec 15, 2017

This is a change in matplotlib 2.1. I'm just about to open a PR that will fix that for other reasons.

@minrk minrk mentioned this issue Dec 15, 2017
6 tasks
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

Successfully merging a pull request may close this issue.

3 participants