Spyder hangs on launch - Throws "Warning: cannot register existing type 'GtkWidget'"

226 views
Skip to first unread message

Nicklas Stockton

unread,
Dec 22, 2015, 5:39:46 PM12/22/15
to spyder
I installed Spyder on my 64-bit Ubuntu box from the repositories (apt-get). When attempting to launch, I get splash screen and loading messages (in the splash) until eventually it hangs. No window ever appears.

In an attempt to figure out the issue, I pulled down the git repo and launched Spyder from bootstrap.py to the same result. Running it with --debug gives the following output:

me@xubuntu:~/spyder$ python bootstrap.py --debug
Executing Spyder from source checkout
Revision 0bb07e0, Branch: master
01. Patched sys.path with /home/me/spyder
02. PySide is detected, selecting
0x. Switching debug mode on
03. Imported Spyder 3.0.0dev
   
[Python 2.7.6 64bits, Qt 4.8.6, PySide 1.2.1 on Linux]
04. Executing spyder.main()
Bootstrap completed in 00:00:00.4500
Start of MainWindow constructor
End of MainWindow constructor
*** Start of MainWindow setup ***
 
..core actions
 
..toolbars
 
..tools
 
..sift?
 
..plugin: internal console
   
..internal console: initializing
 
..plugin: working directory
Loading help...
X
Error: BadCursor (invalid Cursor parameter) 6
 
Major opcode: 2 (X_ChangeWindowAttributes)
 
Resource id:  0x3
X
Error: BadCursor (invalid Cursor parameter) 6
 
Major opcode: 95 (X_FreeCursor)
 
Resource id:  0x3
Loading outline explorer...
Loading editor...
Requires Rope >=0.9.4
Requires Jedi >=0.8.1;<0.9.0
Instropection Plugin Loaded: fallback
Plugins loaded: ['fallback']
X
Error: BadCursor (invalid Cursor parameter) 6
 
Major opcode: 2 (X_ChangeWindowAttributes)
 
Resource id:  0x3
X
Error: BadCursor (invalid Cursor parameter) 6
 
Major opcode: 2 (X_ChangeWindowAttributes)
 
Resource id:  0x3
X
Error: BadCursor (invalid Cursor parameter) 6
 
Major opcode: 95 (X_FreeCursor)
 
Resource id:  0x3
X
Error: BadCursor (invalid Cursor parameter) 6
 
Major opcode: 2 (X_ChangeWindowAttributes)
 
Resource id:  0x3
X
Error: BadCursor (invalid Cursor parameter) 6
 
Major opcode: 95 (X_FreeCursor)
 
Resource id:  0x3
/usr/local/lib/python2.7/dist-packages/pandas/rpy/__init__.py:11:
 
FutureWarning: The pandas.rpy module is deprecated and will be removed
in a future version. We refer to external packages like rpy2.
See here for a guide on how to port your code to rpy2: http://pandas.pydata.org/pandas-docs/stable/r_interface.html
 
FutureWarning)
 
..widgets
Loading file explorer...
/usr/local/lib/python2.7/dist-packages/matplotlib/cbook.py:137:
 
MatplotlibDeprecationWarning: The matplotlib.delaunay module was
deprecated
in version 1.4. Use matplotlib.tri.Triangulation instead.
  warnings
.warn(message, mplDeprecation, stacklevel=1)
/usr/lib/python2.7/dist-packages/gi/module.py:178: Warning: cannot register existing type 'GtkWidget'
  g_type
= info.get_g_type()
/usr/lib/python2.7/dist-packages/gi/module.py:178: Warning: cannot add class private field to invalid type '<invalid>'
  g_type
= info.get_g_type()
/usr/lib/python2.7/dist-packages/gi/module.py:178:
 
Warning: cannot add private field to invalid (non-instantiatable) type
'<invalid>'
  g_type
= info.get_g_type()
/usr/lib/python2.7/dist-packages/gi/module.py:178:
 
Warning: g_type_add_interface_static: assertion
'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
  g_type
= info.get_g_type()
/usr/lib/python2.7/dist-packages/gi/module.py:178: Warning: cannot register existing type 'GtkBuildable'
  g_type
= info.get_g_type()
/usr/lib/python2.7/dist-packages/gi/module.py:178:
 
Warning: g_type_interface_add_prerequisite: assertion
'G_TYPE_IS_INTERFACE (interface_type)' failed
  g_type
= info.get_g_type()
/usr/lib/python2.7/dist-packages/gi/module.py:178: Warning: g_once_init_leave: assertion 'result != 0' failed
  g_type
= info.get_g_type()

The X Errors are not the problem as that is just a minor annoyance as documented here.

Some searching around turned up this similar result which leads me to think that the issue might have something to do with conflicting Gtk library versions loaded at the same time. I intend on digging through the code to see if I can't find out at what point conflicting libraries are being loaded and try to force one consistent version (assuming that is the issue). I figured I would post my issues/progress here in case anyone has encountered or will encounter the same issue.

I should note that launching spyder -l from the terminal succeeds; I get a Spyder python terminal as expected.

Nicklas Stockton

unread,
Jan 11, 2016, 9:41:15 PM1/11/16
to spyder

UPDATE (1-11-16):
Well, I feel a little silly. It turns out it had something to do with an outdated requests module from the 'gi' python package. Running "sudo -H pip install gi --upgrade" updated the module, and now everything is as it should be.

As a side note, Spyder3 (Python 3.4.3) did not have the same issues that Python 2.7.x did. I'm guessing my Py3 dependencies were just more up to date.

Good luck to any who may have this issue and happy developing!
-Nick
Reply all
Reply to author
Forward
0 new messages