physimals / quantiphyse

Application for analysis and modelling of volumetric medical imaging data
Apache License 2.0
27 stars 3 forks source link

pyqtgraph error #36

Closed mcraig-ibme closed 1 year ago

mcraig-ibme commented 3 years ago

Following exception occurs occasionally when using voxel analysis widget. May be fixed by moving to standard pyqtgraph release since it appears this may now support pyside2.

    |==============================>>
    |  Traceback (most recent call last):
    |    File "/Users/ctsu0221/.conda/envs/qp/bin/quantiphyse", line 8, in <module>
    |      sys.exit(main())
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/qpmain.py", line 150, in main
    |      sys.exit(app.exec_())
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/gui/main_window.py", line 236, in _tab_selected
    |      self.current_widget.activate()
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/packages/core/analysis/widgets.py", line 545, in activate
    |      self._update()
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/packages/core/analysis/widgets.py", line 554, in _update
    |      self._plot()
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/packages/core/analysis/widgets.py", line 618, in _plot
    |      self.plot.clear()
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/gui/plot.py", line 358, in clear
    |      item.hide()
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/gui/plot.py", line 243, in hide
    |      self.axes.removeItem(item)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/PlotItem/PlotItem.py", line 567, in removeItem
    |      self.vb.removeItem(item)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/ViewBox/ViewBox.py", line 416, in removeItem
    |      self.scene().removeItem(item)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/ViewBox/ViewBox.py", line 67, in itemChange
    |      listener.itemsChanged()
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/ViewBox/ViewBox.py", line 1027, in itemsChanged
    |      self.updateAutoRange()
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/ViewBox/ViewBox.py", line 884, in updateAutoRange
    |      self.setRange(**args)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/ViewBox/ViewBox.py", line 572, in setRange
    |      self.updateViewRange(lockX, lockY)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/ViewBox/ViewBox.py", line 1541, in updateViewRange
    |      self.sigRangeChanged.emit(self, self.state['viewRange'])
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/utils/__init__.py", line 54, in _wrapper
    |      return fn(*args)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/gui/plot.py", line 380, in _range_changed
    |      self.options.yrange = self.axes.viewRange()[1]
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/gui/plot.py", line 132, in yrange
    |      self.sig_options_changed.emit(self)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/gui/plot.py", line 247, in _options_changed
    |      self.show()
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/gui/plot.py", line 229, in show
    |      symbolSize=self.point_size)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/PlotItem/PlotItem.py", line 608, in plot
    |      self.addItem(item, params=params)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/PlotItem/PlotItem.py", line 485, in addItem
    |      self.vb.addItem(item, *args, **vbargs)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/ViewBox/ViewBox.py", line 405, in addItem
    |      item.setParentItem(self.childGroup)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/GraphicsItem.py", line 386, in setParentItem
    |      return self._qtBaseClass.setParentItem(self, parent)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/qpmain.py", line 70, in my_catch_exceptions
    |      error_dialog(str(exc), title="Error", detail=detail)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/quantiphyse/gui/dialogs.py", line 48, in error_dialog
    |      QtGui.QMessageBox.warning(MAINWIN, title, text, QtGui.QMessageBox.Close)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/widgets/GraphicsView.py", line 155, in paintEvent
    |      return QtGui.QGraphicsView.paintEvent(self, ev)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/debug.py", line 93, in w
    |      printExc('Ignored exception:')
    |    --- exception caught here ---
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/debug.py", line 91, in w
    |      func(*args, **kwds)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/ScatterPlotItem.py", line 758, in paint
    |      viewMask = self.getViewMask(pts)
    |    File "/Users/ctsu0221/.conda/envs/qp/lib/python3.7/site-packages/pyqtgraph/graphicsItems/ScatterPlotItem.py", line 725, in getViewMask
    |      viewBounds = vb.mapRectToDevice(vb.boundingRect())
    |  AttributeError: 'GraphicsLayoutWidget' object has no attribute 'mapRectToDevice'
mcraig-ibme commented 3 years ago

No recurrence since switching to standard pyqtgraph release - marking as fixed

mcraig-ibme commented 1 year ago

Closing, no recurrence