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

Test failure kernel.inprocess #6552

Closed
rebecca-owen opened this issue Sep 26, 2014 · 12 comments · Fixed by #7430
Closed

Test failure kernel.inprocess #6552

rebecca-owen opened this issue Sep 26, 2014 · 12 comments · Fixed by #7430
Milestone

Comments

@rebecca-owen
Copy link

Test group: kernel.inprocess
F.......
======================================================================
FAIL: Does pylab work in the in-process kernel?
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/IPython/testing/decorators.py", line 225, in skipper_func
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/IPython/kernel/inprocess/tests/test_kernel.py", line 49, in test_pylab
    self.assert_('matplotlib' in msg['content']['data'])
AssertionError: False is not true
    'False is not true' = self._formatMessage('False is not true', "%s is not true" % safe_repr(False))
>>  raise self.failureException('False is not true')

-------------------- >> begin captured logging << --------------------
IPython.kernel.inprocess.ipkernel: DEBUG:
*** MESSAGE TYPE:execute_request***
IPython.kernel.inprocess.ipkernel: DEBUG:    Content: {u'code': u'%pylab', u'silent': False, u'user_variables': [], u'store_history': True, u'user_expressions': {}, u'allow_stdin': True}
   --->

IPython.kernel.inprocess.ipkernel: DEBUG: {'parent_header': {u'date': datetime.datetime(2014, 9, 26, 11, 48, 27, 263401), u'username': u'beccamorgan92', u'session': u'07e688ec-88dc-4011-a9d1-7fc50398e5ca', u'msg_id': u'4f602414-2f3f-46f6-8903-e2f8623b5ee2', u'msg_type': u'execute_request'}, 'msg_type': u'execute_reply', 'msg_id': '58c2ccab-dfc6-44f5-9213-6449b6de06c8', 'content': {u'status': u'ok', u'execution_count': 1, u'user_variables': {}, u'payload': [], u'user_expressions': {}}, 'header': {'date': datetime.datetime(2014, 9, 26, 11, 48, 28, 701177), 'username': u'beccamorgan92', 'session': u'8786d191-9eee-4b1e-82dd-19da74c0e33d', 'msg_id': '58c2ccab-dfc6-44f5-9213-6449b6de06c8', 'msg_type': u'execute_reply'}, 'tracker': <zmq.sugar.tracker.MessageTracker object at 0x109223710>, 'metadata': {'dependencies_met': True, 'engine': u'474aa60e-7008-45e5-97ec-e21146ec614c', 'status': u'ok', 'started': datetime.datetime(2014, 9, 26, 11, 48, 27, 267768)}}
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 8 tests in 1.655s

FAILED (failures=1)

______________________________________________________________________
Test suite completed for system with the following information:
IPython version: 2.2.0
IPython commit : d87a8cd (installation)
IPython package: /usr/local/lib/python2.7/site-packages/IPython
Python version : 2.7.8 (default, Sep 14 2014, 19:04:32) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]
sys.executable : /usr/local/opt/python/bin/python2.7
Platform       : Darwin-13.4.0-x86_64-i386-64bit

Tools and libraries available at test time:
   casperjs curses cython jinja2 matplotlib numpy oct2py pexpect pygments pymongo qt requests rpy2 sphinx sqlite3 tornado zmq

Status: ERROR - 1 out of 1 test groups failed (kernel.inprocess). Took 3.056s.

You may wish to rerun these, with:
  iptest kernel.inprocess
@takluyver
Copy link
Member

If this is reproducible, can you stick a print(msg) just above the line that fails to see what the message is that it's checking.

takluyver added a commit to takluyver/ipython that referenced this issue Sep 26, 2014
takluyver added a commit to takluyver/ipython that referenced this issue Sep 26, 2014
takluyver added a commit that referenced this issue Sep 26, 2014
@rebecca-owen
Copy link
Author

Here's the message - apologies, I imagine most of this is junk!

{'parent_header': {u'date': datetime.datetime(2014, 9, 26, 19, 59, 23, 726586), u'username': u'beccamorgan92', u'session': u'4faf15f3-5441-4ea7-9df5-dca1e80685a2', u'msg_id': u'07ca2fb1-3c06-41e2-90a7-804d7d1ee22e', u'msg_type': u'execute_request'}, 'msg_type': u'stream', 'msg_id': u'1df10e3d-068c-4f06-8a37-6752c259bcb9', 'content': {u'data': u'Value error parsing header in AFM: StartFontMetrics 2.0\rComment UniqueID 4130001\rComment Panose 2 0 5 0 4 0 0 2 0 4\r ... Value error parsing header in AFM:', u'name': u'stderr'}, 'header': {u'date': datetime.datetime(2014, 9, 26, 19, 59, 30, 578891), u'username': u'beccamorgan92', u'session': u'e93d058d-1d1d-4a47-8321-702fb101c025', u'msg_id': u'1df10e3d-068c-4f06-8a37-6752c259bcb9', u'msg_type': u'stream'}, 'buffers': [], 'metadata': {}}

@minrk
Copy link
Member

minrk commented Sep 26, 2014

@rebeccamorgan what output do you see from ipython --matplotlib?

@rebecca-owen
Copy link
Author

Using matplotlib backend: MacOSX

@rebecca-owen
Copy link
Author

matplotlib.__file__ gives /Library/Python/2.7/site-packages/matplotlib-override/matplotlib/__init__.pyc and version 1.3.1

@minrk
Copy link
Member

minrk commented Sep 26, 2014

Hm. It doesn't seem like there's anything wrong with the test. Matplotlib is failing to initialize, and and the test is rightly failing. I imagine it's because of some problematic matpotlib state or configuration.

What do you get from ipython console --matplotlib --debug?

@rebecca-owen
Copy link
Author

[ZMQTerminalIPythonApp] Config changed:
[ZMQTerminalIPythonApp] {'Application': {'log_level': 10}, 'InteractiveShellApp': {'matplotlib': 'auto'}}
[ZMQTerminalIPythonApp] IPYTHONDIR set to: /Users/beccamorgan92/.ipython
[ZMQTerminalIPythonApp] Using existing profile dir: u'/Users/beccamorgan92/.ipython/profile_default'
[ZMQTerminalIPythonApp] Searching path [u'/Users/beccamorgan92', u'/Users/beccamorgan92/.ipython/profile_default'] for config files
[ZMQTerminalIPythonApp] Attempting to load config file: ipython_config.py
[ZMQTerminalIPythonApp] Attempting to load config file: ipython_console_config.py
[ZMQTerminalIPythonApp] Connection File not found: /Users/beccamorgan92/.ipython/profile_default/security/kernel-50406.json
[ZMQTerminalIPythonApp] Connecting to: tcp://127.0.0.1:51349
[ZMQTerminalIPythonApp] connecting shell channel to tcp://127.0.0.1:51346
[ZMQTerminalIPythonApp] connecting iopub channel to tcp://127.0.0.1:51347
[ZMQTerminalIPythonApp] connecting stdin channel to tcp://127.0.0.1:51348
[ZMQTerminalIPythonApp] connecting heartbeat channel to tcp://127.0.0.1:51350
Python 2.7.8 (default, Sep 14 2014, 19:04:32)
Type "copyright", "credits" or "license" for more information.

IPython 2.2.0 -- 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.

[ZMQTerminalIPythonApp] Loading IPython extensions...
[ZMQTerminalIPythonApp] Loading IPython extension: storemagic
[ZMQTerminalIPythonApp] Starting IPython's mainloop...
[IPKernelApp] Config changed:
[IPKernelApp] {'IPKernelApp': {'parent_handle': 1, 'parent_appname': 'ipython-console', 'log_level': 10, 'connection_file': u'/Users/beccamorgan92/.ipython/profile_default/security/kernel-50406.json', 'matplotlib': 'auto'}}
[IPKernelApp] IPYTHONDIR set to: /Users/beccamorgan92/.ipython
[IPKernelApp] Using existing profile dir: u'/Users/beccamorgan92/.ipython/profile_default'
[IPKernelApp] Searching path [u'/Users/beccamorgan92', u'/Users/beccamorgan92/.ipython/profile_default'] for config files
[IPKernelApp] Attempting to load config file: ipython_config.py
[IPKernelApp] Attempting to load config file: ipython_console_config.py
[IPKernelApp] Loading connection file /Users/beccamorgan92/.ipython/profile_default/security/kernel-50406.json
[IPKernelApp] Starting the kernel at pid: 50409
[IPKernelApp] shell ROUTER Channel on port: 51346
[IPKernelApp] iopub PUB Channel on port: 51347
[IPKernelApp] stdin ROUTER Channel on port: 51348
[IPKernelApp] control ROUTER Channel on port: 51349
[IPKernelApp] Heartbeat REP Channel on port: 51350
[IPKernelApp] To connect another client to this kernel, use:
[IPKernelApp]     --existing kernel-50406.json
[IPKernelApp] Writing connection file: /Users/beccamorgan92/.ipython/profile_default/security/kernel-50406.json
[IPKernelApp] Enabling GUI event loop integration, eventloop=osx, matplotlib=MacOSX
[IPKernelApp] Loading IPython extensions...
[IPKernelApp] Loading IPython extension: storemagic
[IPKernelApp] entering eventloop <function loop_cocoa at 0x10b7eac80>
[IPKernelApp]
*** MESSAGE TYPE:kernel_info_request***
[IPKernelApp]    Content: {}
   --->

@minrk
Copy link
Member

minrk commented Sep 26, 2014

And this?

$ ipython console
In [1]: %pylab

@rebecca-owen
Copy link
Author

Using matplotlib backend: MacOSX Populating the interactive namespace from numpy and matplotlib

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
@ellisonbg
Copy link
Member

@minrk can this be closed?

@minrk
Copy link
Member

minrk commented Jan 12, 2015

@ellisonbg it's a bug in our test that doesn't handle the case where importing mpl causes some warnings to be displayed. We have a utility function for this in the regular kernel tests that we should use here. Should be fixed by #7430.

@ellisonbg
Copy link
Member

Thanks Min!

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

Successfully merging a pull request may close this issue.

4 participants