Source: pyimagetool Version: GUI fails with error 'Qt' has no attribute 'DashLine' Severity: important X-Debbugs-Cc: emmanuel.fa...@synchrotron-soleil.fr
Dear Maintainer, * What led up to the situation? The GUI does not start with command 'python3 -m pyimagetool'. An initial error is produced: >> OSError: Packaged data files are not writeable $ python3 -m pyimagetool Traceback (most recent call last): File "<frozen runpy>", line 189, in _run_module_as_main File "<frozen runpy>", line 148, in _get_module_details File "<frozen runpy>", line 112, in _get_module_details File "/usr/lib/python3/dist-packages/pyimagetool/__init__.py", line 2, in <module> from .ImageTool import ImageTool File "/usr/lib/python3/dist-packages/pyimagetool/ImageTool.py", line 8, in <module> from .widgets import InfoBar File "/usr/lib/python3/dist-packages/pyimagetool/widgets.py", line 6, in <module> from .cmaps import CMap File "/usr/lib/python3/dist-packages/pyimagetool/cmaps/__init__.py", line 1, in <module> from .CMap import CMap File "/usr/lib/python3/dist-packages/pyimagetool/cmaps/CMap.py", line 66, in <module> raise OSError( OSError: Packaged data files are not writeable, use a helper script.See /usr/share/pyimagetool/debian_pyimagetool.py which we also get from ipython3: $ ipython3 Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] Type 'copyright', 'credits' or 'license' for more information IPython 8.5.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import pyimagetool --------------------------------------------------------------------------- OSError Traceback (most recent call last) Cell In [1], line 1 ----> 1 import pyimagetool File /usr/lib/python3/dist-packages/pyimagetool/__init__.py:2 1 from .DataMatrix import RegularDataArray ----> 2 from .ImageTool import ImageTool 3 from .PGImageTool import PGImageTool 5 __all__ = ['ImageTool', 'RegularDataArray'] File /usr/lib/python3/dist-packages/pyimagetool/ImageTool.py:8 5 import numpy as np 6 import warnings ----> 8 from .widgets import InfoBar 9 from .PGImageTool import PGImageTool 10 from .DataMatrix import RegularDataArray File /usr/lib/python3/dist-packages/pyimagetool/widgets.py:6 3 from functools import partial 5 from .DataMatrix import RegularDataArray ----> 6 from .cmaps import CMap 9 class InfoBar(QtWidgets.QWidget): 10 """Based on the input data, create a suitable info bar (maybe with tabs?)""" File /usr/lib/python3/dist-packages/pyimagetool/cmaps/__init__.py:1 ----> 1 from .CMap import CMap File /usr/lib/python3/dist-packages/pyimagetool/cmaps/CMap.py:66 64 modulepath = Path(xdg.xdg_cache_home(), "PyImageTool") 65 if not os.access(str(modulepath), os.W_OK): ---> 66 raise OSError( 67 "Packaged data files are not writeable, use a helper script." 68 "See /usr/share/pyimagetool/debian_pyimagetool.py" 69 ) 72 class CMap: 73 _instance = None OSError: Packaged data files are not writeable, use a helper script.See /usr/share/pyimagetool/debian_pyimagetool.py It is possible to allow the package to write in the area area, but an other error then comes in: File /usr/lib/python3/dist-packages/pyimagetool/PGImageTool.py:24, in PGImageTool() 22 index_to_coord: List[str] = ['x', 'y', 'z', 't'] 23 frame_rate = 60 ---> 24 bin_pen = pg.mkPen(style=pg.Qt.QtCore.Qt.DashLine) 26 mouse_hover = QtCore.Signal(str) # event fired when the mouse moves on an image 28 def __init__(self, data: RegularDataArray, parent=None, layout=0): AttributeError: type object 'Qt' has no attribute 'DashLine' * What outcome did you expect instead? The GUI, or a python Notebook should be usable, but this is not the case. Considering that the code has not changed for 3 years, and that the corresponding issue was sent https://github.com/kgord831/PyImageTool/issues/5 but had no answer, we recommend to drop this package. -- System Information: Debian Release: 12.1 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-11-amd64 (SMP w/256 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled