Comments (10)
@jr-timme 👍 yes, done now in latest commit. Binaries shall be available soon. Thanks!
from nagstamon.
@fermino well, Nagstamon here is only interested in the major version. The minor and bugfix versions are only catched there from the standard QT version string.
So it would be enough to grab just the major version, via something like
QT_VERSION_MAJOR = int(QT_VERSION_STR.split('.')[0])
Regarding a version selection variable I thing we should go the Qt6 way. The used variable already comes with Qt and it would make things more complex to use such a switch.
from nagstamon.
Had the exact same issue, @HenriWahl 's solution does the trick for me for now.
from nagstamon.
I also ran into this Problem and am currently running Nagstamon with the change mentioned by @HenriWahl :
diff --git a/Nagstamon/QUI/qt.py b/Nagstamon/QUI/qt.py
index 3bc50c5b..50fb0886 100644
--- a/Nagstamon/QUI/qt.py
+++ b/Nagstamon/QUI/qt.py
@@ -28,7 +28,7 @@ try:
from PyQt6.QtCore import PYQT_VERSION_STR as QT_VERSION_STR
# get int-ed version parts
- QT_VERSION_MAJOR, QT_VERSION_MINOR, QT_VERSION_BUGFIX = [int(x) for x in QT_VERSION_STR.split('.')]
+ QT_VERSION_MAJOR = int(QT_VERSION_STR.split('.')[0])
# for later decision which differences have to be considered
QT_FLAVOR = 'PyQt6'
except ImportError:
I haven't found any problems yet.
So if there is no reason to include the Minor and Bugfix versions this could be merged?
from nagstamon.
I fixed it in latest testing release 3.15-240417 - can you please try it?
from nagstamon.
I think one of the square brackets should be moved further back as we want to limit the output of the split function to the first two elements and not the output of the list comprehension?
>>> from PyQt6.QtCore import PYQT_VERSION_STR as QT_VERSION_STR
>>> [int(x) for x in QT_VERSION_STR.split('.')][0:2]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in <listcomp>
ValueError: invalid literal for int() with base 10: 'dev2404081550'
>>> [int(x) for x in QT_VERSION_STR.split('.')[0:2]]
[6, 7]
or did I misunderstand the intent of the change?
I'm not sure if the Version Number always is the way it is now but if it is, we could also keep the Patch version if we limit the array to the first 3 elements:
>>> QT_VERSION_STR.split('.')
['6', '7', '0', 'dev2404081550']
>>> [int(x) for x in QT_VERSION_STR.split('.')[0:3]]
[6, 7, 0]
edit: that also seems to be the workaround the AUR nagstamon-git package maintainer chose:
+ sed -i Nagstamon/QUI/qt.py -e "s/QT_VERSION_STR.split('.')/QT_VERSION_STR.split('.')[0:3]/"
from nagstamon.
@jr-timme Nagstamon only needs the major and the minor version part, so it is ok to ignore the bugfix level.
from nagstamon.
Ok, so then only the square bracket should be moved further back to prevent the list comprehension from still trying to cast dev2404081550
into an integer
from nagstamon.
Hi,
@HenriWahl Can you release a little version for example 3.14.1 with this fix ?
Is better than use a workaround.
Best Regards
from nagstamon.
@liberodark sorry for the delay but I am really short on time and the next weeks won't get better, so I do not like to publish a new stable version while not being available. The fix is already in the testing release.
from nagstamon.
Related Issues (20)
- Nagstamon 3.14 - Changing network does not refresh the application HOT 1
- Nagstamon 3.14.0 and 3.10.1 not working with Zabbix 6.4.12 HOT 10
- Nagstamon-3.14.0-win64_setup.exe and threat W64/S-e4cd4610!Eldorado HOT 5
- nagstamon v3.14.0 on Win11 23H2 - icinga KeyError host_name HOT 2
- 3.14 locks up at start HOT 4
- Updating nagstatmon from 3.10.1 to 3.14.0 breaks on Windows 2022 HOT 4
- Nagstamon 3.14.0 and Zabbix 6.2.9 - All information copy not complate HOT 2
- Regex duration issue HOT 2
- AttributeError with Icinga DB 1.2.0 / Icinga DB Web 1.1.2 HOT 2
- Help for integration HOT 3
- [Feature][Integration] Opsgenie HOT 2
- Display own columns from check_MK view in nagstamon HOT 2
- Sorting by duration not saved when restarting nagstamon (minor cosmetic problem) HOT 2
- Nagstamon 3.15-20240506, Fedora 40, Couldn't load VAAPI library HOT 8
- MacOS 14.5 no sound
- Nagstamon not filtering DOWN hosts for DURATION HOT 1
- Can you add universal release for Linux ? HOT 1
- Problem with settings in Nagstamon 3.14 in windows HOT 2
- check-mk saml auth with entra-id as idp HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nagstamon.