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

ipython qtconsole does not display the prompt on OSX #3374

Closed
dashesy opened this issue May 28, 2013 · 11 comments
Closed

ipython qtconsole does not display the prompt on OSX #3374

dashesy opened this issue May 28, 2013 · 11 comments
Milestone

Comments

@dashesy
Copy link

dashesy commented May 28, 2013

Opens the GUI but does not show the welcome note, nor the prompt (to type in the commands).
Here is the warning I get (it is a warning, but the only clue I currently have):

2013-05-28 16:19:48.811 Python[1569:707] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.

Is there any switch that I can use to get more information? Or to get some extra log?

@minrk
Copy link
Member

minrk commented May 28, 2013

Sounds like a bug in lower level code than IPython. What versions of everything: Python, Qt, PyQt/PySide, pyzmq, libzmq, IPython?

@dashesy
Copy link
Author

dashesy commented May 28, 2013

python 2.7.5
qt-4.8.4
pyqt-4.10.1
pyside/1.1.2
ipython (0.13.2)
pyzmq (13.1.0)
zeromq: stable 3.2.3

Is there any verbose debugging switch I can use?

@minrk
Copy link
Member

minrk commented May 28, 2013

Is there any verbose debugging switch I can use?

ipython qtconsole --debug

@dashesy
Copy link
Author

dashesy commented May 29, 2013

Thanks, but I had tried that already which did not give more information

@minrk
Copy link
Member

minrk commented May 29, 2013

What is the complete output of ipython qtconsole --debug?

@dashesy
Copy link
Author

dashesy commented May 29, 2013

$ ipython qtconsole --debug
[IPythonQtConsoleApp] Config changed:
[IPythonQtConsoleApp] {'Application': {'log_level': 10}} [IPythonQtConsoleApp] Using existing profile dir: u'/Users/brettdowden/.ipython/profile_default'
[IPythonQtConsoleApp] Searching path [u'/Users/brettdowden', u'/Users/brettdowden/.ipython/profile_default'] for config files 
[IPythonQtConsoleApp] Attempting to load config file: ipython_config.py [IPythonQtConsoleApp] Config file ipython_config.py not found 
[IPythonQtConsoleApp] Attempting to load config file: ipython_qtconsole_config.py
[IPythonQtConsoleApp] Config file not found, skipping: ipython_qtconsole_config.py 
[IPythonQtConsoleApp] Connection File not found: /Users/brettdowden/.ipython/profile_default/security/kernel-7864.json
[IPKernelApp] Config changed:
[IPKernelApp] {'KernelApp': {'parent_appname': 'ipython-qtconsole'}, 'IPKernelApp': {'log_level': 10, 'connection_file': u'/Users/brettdowden/.ipython/profile_default/security/kernel-7864.json', 'parent': 1}} 
[IPKernelApp] Using existing profile dir: u'/Users/brettdowden/.ipython/profile_default'
[IPKernelApp] Searching path [u'/Users/brettdowden', u'/Users/brettdowden/.ipython/profile_default'] for config files
[IPKernelApp] Attempting to load config file: ipython_config.py 
[IPKernelApp] Config file ipython_config.py not found 
[IPKernelApp] Attempting to load config file: ipython_qtconsole_config.py 
[IPKernelApp] Config file not found, skipping: ipython_qtconsole_config.py 
[IPKernelApp] Loading connection file /Users/brettdowden/.ipython/profile_default/security/kernel-7864.json
[IPKernelApp] Starting the kernel at pid: 7865 
[IPKernelApp] shell ROUTER Channel on port: 55632 
[IPKernelApp] iopub PUB Channel on port: 55633 
[IPKernelApp] stdin ROUTER Channel on port: 55634 
[IPKernelApp] Heartbeat REP Channel on port: 55635 
[IPKernelApp] To connect another client to this kernel, use:
[IPKernelApp] --existing kernel-7864.json
2013-05-29 08:40:47.637 Python[7864:707] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. 

@minrk
Copy link
Member

minrk commented May 29, 2013

Can you connect a terminal console to the running kernel with

ipython console --existing kernel-7864.json

after starting?

Can you confirm that all processes are running with

ps aux | grep -i ipython

@dashesy
Copy link
Author

dashesy commented May 29, 2013

Grep says ipython is running:
$ ps aux | grep -i ipython
brettdowden 9506 0.5 0.5 2726164 85312 s000 S+ 1:03PM 0:01.60 /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /usr/local/share/python/ipython qtconsole --debug

But cannot connect to the kernel; some problem with pyreadline which I assumed is not needed for qtconsole (I might have been wrong):

$ ipython console --existing kernel-9506.json
Traceback (most recent call last):
File "/usr/local/share/python/ipython", line 9, in
load_entry_point('ipython==0.13.2', 'console_scripts', 'ipython')()
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py", line 388, in launch_new_instance
app.initialize()
File "", line 2, in initialize
File "/usr/local/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
return method(app, _args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py", line 313, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
return method(app, _args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/IPython/core/application.py", line 325, in initialize
self.parse_command_line(argv)
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py", line 308, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "", line 2, in parse_command_line
File "/usr/local/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
return method(app, _args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/IPython/config/application.py", line 420, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "", line 2, in initialize_subcommand
File "/usr/local/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
return method(app, _args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/IPython/config/application.py", line 352, in initialize_subcommand
subapp = import_item(subapp)
File "/usr/local/lib/python2.7/site-packages/IPython/utils/importstring.py", line 40, in import_item
module = import(package,fromlist=[obj])
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/console/app.py", line 34, in
from IPython.frontend.terminal.console.interactiveshell import ZMQTerminalInteractiveShell
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/console/interactiveshell.py", line 33, in
from IPython.frontend.terminal.console.completer import ZMQCompleter
File "/usr/local/lib/python2.7/site-packages/IPython/frontend/terminal/console/completer.py", line 2, in
import readline
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyreadline-2.0-py2.7.egg/readline.py", line 6, in
from pyreadline.rlmain import Readline
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyreadline-2.0-py2.7.egg/pyreadline/init.py", line 11, in
from . import unicode_helper, logger, clipboard, lineeditor, modes, console
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyreadline-2.0-py2.7.egg/pyreadline/modes/init.py", line 3, in
from . import emacs, notemacs, vi
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyreadline-2.0-py2.7.egg/pyreadline/modes/emacs.py", line 16, in
from . import basemode
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyreadline-2.0-py2.7.egg/pyreadline/modes/basemode.py", line 14, in
from pyreadline.keysyms.common import make_KeyPress_from_keydescr
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyreadline-2.0-py2.7.egg/pyreadline/keysyms/init.py", line 7, in
from . import winconstants
ImportError: cannot import name winconstants

@minrk
Copy link
Member

minrk commented May 29, 2013

how/why do you have pyreadline? pyreadline is only for Windows.

@dashesy
Copy link
Author

dashesy commented May 29, 2013

I think I got the habit of installing it after having problem with tab completion, and apparently forgot the reason behind it.
Sure enough, now I uninstalled it and everything runs again, problem resolved, thanks

I thought pyreadline should not affect qtconsole because qt has its own input handling, but it seems installing pyreadline changes things that it should not.

@minrk
Copy link
Member

minrk commented May 29, 2013

IPython will not be able to import readline if pyreadline is installed on platforms other than OS X. The QtConsole doesn't use readline, but it is probably imported as a side effect of something lower level.

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

2 participants