← Back to team overview

yade-users team mailing list archive

[Question #643666]: plot.plot giving QObject::connect: cannot connect (apt-get installed yade)

 

New question #643666 on Yade:
https://answers.launchpad.net/yade/+question/643666

I installed yade 2016.06a using 2016.06a-4 apt package (ubuntu 16.04). Perhaps there is a problem with qt support. Should I recompile by hand?

Symptoms:

1) If I launch yade and immediately press F8 I get


Yade [1]: import yade.plot; yade.plot.plot();
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
/usr/bin/yade in <module>()
----> 1 import yade.plot; yade.plot.plot();

/usr/lib/x86_64-linux-gnu/yade/py/yade/plot.py in plot(noShow, subPlots)
    593         global currLineRefs
    594         figs=set([l.line.axes.get_figure() for l in currLineRefs])
--> 595         if not hasattr(list(figs)[0],'show') and not noShow:
    596                 import warnings
    597                 warnings.warn('plot.plot not showing figure (matplotlib using headless backend?)')

IndexError: list index out of range

--------------------------------------------------------------------

2) If I launch yade and paste (line by line) the example in 
https://github.com/yade/trunk/blob/master/examples/simple-scene/simple-scene-plot.py

as soon as I press return on the line
 plot.plot(subPlots=False)
I get 

Yade [18]: plot.plot(subPlots=False)
QObject::connect: Cannot connect NavigationToolbar2QT::message(QString) to (null)::_show_message()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/usr/bin/yade in <module>()
----> 1 plot.plot(subPlots=False)

/usr/lib/x86_64-linux-gnu/yade/py/yade/plot.py in plot(noShow, subPlots)
    590         .. note:: For backwards compatibility reasons, *noShow* option will return list of figures for multiple figures but a single figure (rather than list with 1 element) if there is only 1 figure.
    591 	"""
--> 592         createPlots(subPlots=subPlots)
    593         global currLineRefs
    594         figs=set([l.line.axes.get_figure() for l in currLineRefs])

/usr/lib/x86_64-linux-gnu/yade/py/yade/plot.py in createPlots(subPlots, scatterSize, wider)
    378         for nPlot,p in enumerate(plots.keys()):
    379                 pStrip=p.strip().split('=',1)[0]
--> 380                 if not subPlots: pylab.figure()
    381                 else: pylab.subplot(subRows,subCols,nPlot+1)
    382                 if plots[p]==None: # image plot

/usr/lib/python2.7/dist-packages/matplotlib/pyplot.pyc in figure(num, figsize, dpi, facecolor, edgecolor, frameon, FigureClass, **kwargs)
    525                                         frameon=frameon,
    526                                         FigureClass=FigureClass,
--> 527                                         **kwargs)
    528 
    529         if figLabel:

/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5agg.pyc in new_figure_manager(num, *args, **kwargs)
     41     FigureClass = kwargs.pop('FigureClass', Figure)
     42     thisFig = FigureClass(*args, **kwargs)
---> 43     return new_figure_manager_given_figure(num, thisFig)
     44 
     45 

/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5agg.pyc in new_figure_manager_given_figure(num, figure)
     49     """
     50     canvas = FigureCanvasQTAgg(figure)
---> 51     return FigureManagerQT(canvas, num)
     52 
     53 

/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5.pyc in __init__(self, canvas, num)
    463         if self.toolbar is not None:
    464             self.window.addToolBar(self.toolbar)
--> 465             self.toolbar.message.connect(self._show_message)
    466             tbs_height = self.toolbar.sizeHint().height()
    467         else:

TypeError: connect() failed between NavigationToolbar2QT.message[str] and _show_message()


-- 
You received this question notification because your team yade-users is
an answer contact for Yade.