silx-kit / pyFAI

Fast Azimuthal Integration in Python
Other
104 stars 94 forks source link

[debian 10] unit test failure due to icons #973

Open picca opened 5 years ago

picca commented 5 years ago

Hello, here the link to the build

https://salsa.debian.org/science-team/pyfai/-/jobs/64655/raw

it failed with

======================================================================
ERROR: test_empty_data (pyFAI.gui.test.test_calibration.TestCalibration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/building/package/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/test/test_calibration.py", line 83, in test_empty_data
    window = CalibrationWindow(context)
  File "/tmp/building/package/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/calibration/CalibrationWindow.py", line 151, in __init__
    self.__tasks = self.createTasks()
  File "/tmp/building/package/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/calibration/CalibrationWindow.py", line 244, in createTasks
    ExperimentTask(),
  File "/tmp/building/package/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/calibration/AbstractCalibrationTask.py", line 48, in __init__
    self._initGui()
  File "/tmp/building/package/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/calibration/ExperimentTask.py", line 57, in _initGui
    qt.loadUi(pyFAI.utils.get_ui_file("calibration-experiment.ui"), self)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/__init__.py", line 226, in loadUi
    return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/Loader/loader.py", line 72, in loadUi
    return self.parse(filename, resource_suffix, basedir)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 1021, in parse
    actor(elem)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 828, in createUserInterface
    self.traverseWidgetTree(elem)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 503, in createLayout
    self.traverseWidgetTree(elem)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 546, in handleItem
    self.traverseWidgetTree(elem)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 273, in createWidget
    self.traverseWidgetTree(elem)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 503, in createLayout
    self.traverseWidgetTree(elem)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 546, in handleItem
    self.traverseWidgetTree(elem)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 273, in createWidget
    self.traverseWidgetTree(elem)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 503, in createLayout
    self.traverseWidgetTree(elem)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 546, in handleItem
    self.traverseWidgetTree(elem)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 264, in createWidget
    self.stack.push(self.setupObject(widget_class, parent, elem))
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 228, in setupObject
    obj = self.factory.createQObject(clsname, name, args, is_attribute)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/objcreator.py", line 118, in createQObject
    return self._cpolicy.instantiate(factory, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/PyQt5/uic/Loader/qobjectcreator.py", line 137, in instantiate
    return clsObject(*ctor_args)
  File "/tmp/building/package/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/widgets/CalibrantSelector.py", line 52, in __init__
    icon = icons.getQIcon("pyfai:gui/icons/calibrant")
  File "/usr/lib/python2.7/dist-packages/silx/gui/icons.py", line 333, in getQIcon
    qfile = getQFile(name)
  File "/usr/lib/python2.7/dist-packages/silx/gui/icons.py", line 401, in getQFile
    raise ValueError('Not an icon name: %s' % name)
ValueError: Not an icon name: pyfai:gui/icons/calibrant
vallsv commented 5 years ago

It could be a bad installation of Qt5 in case png and svg media are not supported.

Could you try to print the result of

# with python2.7
from silx.gui import qt
qt.supportedImageFormats()

It expect to have at least "png".

Or maybe an extra Qt5 module have to be installed

vasole commented 5 years ago

Just in case it helps, the module QtSvg is not always available in debian.

One has to install it (package python-pyqt5.qtsvg)

https://packages.debian.org/sid/python-pyqt5.qtsvg

picca commented 5 years ago
In [2]: from silx.gui import qt

In [3]: qt.supportedImageFormats()
Out[3]:
{'bmp',
 'cur',
 'gif',
 'ico',
 'jpeg',
 'jpg',
 'pbm',
 'pgm',
 'png',
 'ppm',
 'svg',
 'svgz',
 'xbm',
 'xpm'}

but I am not sure that this is the same during the build...

vallsv commented 5 years ago

Maybe you could try this command line in the build context?

python -c "from silx.gui import qt; print(qt.supportedImageFormats())"
vallsv commented 5 years ago

BTW the GUI application is not supposed to work on Python 2, then we could disable the GUI tests on Python 2.