karlch / vimiv-qt

An image viewer with vim-like keybindings
https://karlch.github.io/vimiv-qt/
GNU General Public License v3.0
177 stars 15 forks source link

invalid literal for int after system update #802

Closed ArtemSmaznov closed 4 months ago

ArtemSmaznov commented 4 months ago

I've updated my system (arch linux) the other day and now vimiv crashes with the following traceback:

➜ vimiv
Traceback (most recent call last):
  File "/usr/bin/vimiv", line 7, in <module>
    from vimiv.startup import main
  File "/usr/lib/python3.11/site-packages/vimiv/__init__.py", line 5, in <module>
    import vimiv.checkversion
  File "/usr/lib/python3.11/site-packages/vimiv/checkversion.py", line 67, in <module>
    check_pyqt_version()
  File "/usr/lib/python3.11/site-packages/vimiv/checkversion.py", line 40, in check_pyqt_version
    pyqt_version = tuple(map(int, PYQT_VERSION_STR.split(".")))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'dev2404081550'

Vimiv version from the aur

Name            : vimiv-qt-git
Version         : r2738.dfdd6476-1

UPDATE: Not an issue with the main package version from the standard repos

Name            : vimiv
Version         : 0.9.1-6
karlch commented 4 months ago

Thanks a bunch for reporting! I have tried to push a quickfix in 0902c81a4cefc516cfdac3627a23bcd133291580 which solves the issue for me. Mind trying again with the AUR package? This may even warrant a new release of the Qt version, I will investigate further once I find the time.

The issue was that the newest PyQt6 had a version string followed by the dev part you saw, instead of three plain numbers as it was up to now: "6.7.0.dev2404081550". So we now just investigate the first three parts of the split.

Note: the one in the standard repos is the non-qt version, which is thus not affected, but our vimiv-qt aur package most likely is. I haven't come to testing it though.

ArtemSmaznov commented 4 months ago

Thanks, vimiv-qt-git now works for me again. Didn't notice that the standard was not the qt version. Just looked that the version numbers looked similar so thanks for the heads up. vimiv-qt from the AUR seems to work for me just fine though.

karlch commented 4 months ago

Perfect, thanks for testing :blush: Will go ahead and close this then.

Ah, of course, vimiv-qt still has no support for PyQt6. Probably also a valid reason to slowly go for a release, but not as critical as a broken package.