Olivier
Olivier

Reputation: 118

qtodotxt / PyQt5 dumps core

Running the test.sh script below dumps core on various pcs running both fedora 40 and 41:

test.sh: (beware it destroys your ./tmp and your pip cache)

cat /etc/os-release
python --version
which python
md5sum $(which python) 

rm -rf ./tmp
mkdir -p ./tmp
cd ./tmp
mkdir -p venv
python -m venv venv
. ./venv/bin/activate
pip cache purge
pip install -r ../piplibraries.txt
qtodotxt

where piplibraries.txt reads:

PyQt5==5.15.11
PyQt5-Qt5==5.15.15
PyQt5_sip==12.15.0
python-dateutil==2.9.0.post0
qtodotxt==1.9.0
six==1.16.0

The stdout of the script (on fedora 41) reads:

NAME="Fedora Linux"
VERSION="41 (Workstation Edition)"
RELEASE_TYPE=stable
ID=fedora
VERSION_ID=41
VERSION_CODENAME=""
PLATFORM_ID="platform:f41"
PRETTY_NAME="Fedora Linux 41 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:41"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f41/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=41
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=41
SUPPORT_END=2025-12-15
VARIANT="Workstation Edition"
VARIANT_ID=workstation
Python 3.13.0
/usr/bin/python
b754f86375e105b86bb4392d88580ae1  /usr/bin/python
Files removed: 46
Collecting PyQt5==5.15.11 (from -r ../piplibraries.txt (line 1))
  Downloading PyQt5-5.15.11-cp38-abi3-manylinux_2_17_x86_64.whl.metadata (2.1 kB)
Collecting PyQt5-Qt5==5.15.15 (from -r ../piplibraries.txt (line 2))
  Downloading PyQt5_Qt5-5.15.15-py3-none-manylinux2014_x86_64.whl.metadata (536 bytes)
Collecting PyQt5_sip==12.15.0 (from -r ../piplibraries.txt (line 3))
  Downloading PyQt5_sip-12.15.0.tar.gz (104 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting python-dateutil==2.9.0.post0 (from -r ../piplibraries.txt (line 4))
  Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting qtodotxt==1.9.0 (from -r ../piplibraries.txt (line 5))
  Downloading qtodotxt-1.9.0.tar.gz (278 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting six==1.16.0 (from -r ../piplibraries.txt (line 6))
  Downloading six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Downloading PyQt5-5.15.11-cp38-abi3-manylinux_2_17_x86_64.whl (8.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.2/8.2 MB 2.0 MB/s eta 0:00:00
Downloading PyQt5_Qt5-5.15.15-py3-none-manylinux2014_x86_64.whl (59.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.8/59.8 MB 2.2 MB/s eta 0:00:00
Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: PyQt5_sip, qtodotxt
  Building wheel for PyQt5_sip (pyproject.toml): started
  Building wheel for PyQt5_sip (pyproject.toml): finished with status 'done'
  Created wheel for PyQt5_sip: filename=PyQt5_sip-12.15.0-cp313-cp313-linux_x86_64.whl size=83179 sha256=0a7fa349c5b7f375408571f6d161fcce222abd976d5124318089e7e26ee63596
  Stored in directory: /home/odmi/.cache/pip/wheels/5b/f2/f6/93f2f74948dd23880023d3700802befd25cc8228408e85510a
  Building wheel for qtodotxt (pyproject.toml): started
  Building wheel for qtodotxt (pyproject.toml): finished with status 'done'
  Created wheel for qtodotxt: filename=qtodotxt-1.9.0-py3-none-any.whl size=293510 sha256=63d5bc8a7d2a36ea0c60fbf14ae5f06347ad794a866dd7fd7c598067afea5c15
  Stored in directory: /home/odmi/.cache/pip/wheels/a4/49/eb/2c2d44093981564419bd54a992860ba93260007ae762433b45
Successfully built PyQt5_sip qtodotxt
Installing collected packages: qtodotxt, PyQt5-Qt5, six, PyQt5_sip, python-dateutil, PyQt5
Successfully installed PyQt5-5.15.11 PyQt5-Qt5-5.15.15 PyQt5_sip-12.15.0 python-dateutil-2.9.0.post0 qtodotxt-1.9.0 six-1.16.0

and stderr:


[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
Traceback (most recent call last):
  File "/home/odmi/projects/dev/testpyqt5/tmp/venv/lib64/python3.13/site-packages/qtodotxt/ui/views/tasks_search_view.py", line 41, in resizeEvent
    self.clearButton.move(self.rect().right() - frameWidth - sz.width(),
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                          (self.rect().bottom() + 1 - sz.height()) / 2)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: arguments did not match any overloaded call:
  move(self, a0: QPoint): argument 1 has unexpected type 'int'
  move(self, ax: int, ay: int): argument 2 has unexpected type 'float'
test.sh: line 15: 137507 Aborted                 (core dumped) qtodotxt

I can reproduce this on my side in a container by running e.g.

toolbox create testqtodotxt --release=f40
toolbox run --container testqtodotxt sudo dnf install -y $(cat ${PWD}/systemlibraries.txt)
toolbox run --container testqtodotxt sh ${PWD}/test.sh

where systemlibraries.txt reads:

libglvnd-glx
tk-devel
xcb-util-wm
xcb-util-image
xcb-util-keysyms
xcb-util-renderutil
libxkbcommon-x11

What could be the cause of / solution to this error?

P.S. Sidenote: Even though the stderr output says core dumped, I don't actually see a coredump anywhere, but maybe I don't know where to look.

P.P.S. Replacing system library tk-devel by python3-qt5-devel leads to the same error, while just removing it produces a different error:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl, xcb.

/home/odmi/projects/dev/testpyqt5/test.sh: line 14: 133372 Aborted                 (core dumped) qtodotxt

P.P.P.S. qtodotxt documentation mentions the library python3-pyside as a requirement. Fedora provides python3-pyside6, which has qt6 dependencies as opposed to the qt5 dependency of qtodotxt. Installing python3-pyside6 doesn't help.

Upvotes: 0

Views: 50

Answers (1)

Olivier
Olivier

Reputation: 118

As explained by @musicamante: The mismatch in signatures between the qtodotxt and PyQt5 libraries is due to a change in more recent PyQt5 versions, and the pip version qtodotxt==1.9.0 not having been migrated. Thanks due to @musicamante for noticing that the git hub repo does have a fix committed.

Thus, to make qtodotxt work with the current PyQt5, don't pip install qtodotxt==1.9.0, but rather work with a repo clone:

git clone https://github.com/QTodoTxt/QTodoTxt/

Upvotes: 0

Related Questions