qtodotxt / PyQt5 转储核心

问题描述 投票:0回答:1

运行下面的

test.sh
脚本会在运行 Fedora 40 和 41 的各种电脑上转储核心:

test.sh:
(小心它会破坏你的
./tmp
和你的 pip 缓存)

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

其中

piplibraries.txt
内容为:

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

脚本(在 Fedora 41 上)的

stdout
内容为:

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

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

我可以通过运行例如在容器中重现此内容

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

其中

systemlibraries.txt
内容为:

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

此错误的原因/解决方案可能是什么?

附注旁注:尽管

stderr
输出显示
core dumped
,但我实际上没有在任何地方看到核心转储,但也许我不知道在哪里查看。

P.P.S。将系统库

tk-devel
替换为
python3-qt5-devel
会导致相同的错误,而仅删除它会产生不同的错误:

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 文档 提到了库

python3-pyside
作为要求。 Fedora 提供了
python3-pyside6
,它具有 qt6 依赖项,而不是 qtodotxt 的 qt5 依赖项。安装
python3-pyside6
没有帮助。

python-3.x pyqt5 fedora
1个回答
0
投票

@musicamente 在评论中给出了解决方案: 删除

pip install qtodotxt
并将其替换为 github 存储库的克隆。

© www.soinside.com 2019 - 2024. All rights reserved.