Environment
- OS: Debian (Trixie)
- Python: 3.13.5
- GNS3: 3.0.6 (installed via pipx)
Problem
When pressing the middle mouse button in the topology view, GNS3 throws a traceback:
Traceback (most recent call last):
File ".../gns3/graphics_view.py", line 637, in mouseMoveEvent
hBar.setValue(hBar.value() + (delta.x() if QtWidgets.QApplication.isRightToLeft() else -delta.x()))
TypeError: setValue(self, a0: int): argument 1 has unexpected type 'float'
Same for vertical scroll at line 639:
File ".../gns3/graphics_view.py", line 639, in mouseMoveEvent
vBar.setValue(vBar.value() - delta.y())
TypeError: setValue(self, a0: int): argument 1 has unexpected type 'float'
Root cause
PyQt's setValue() expects int, but delta.x() and delta.y() return float in Python 3.13.
Proposed fix
Wrap arguments in int():
hBar.setValue(int(hBar.value() + (delta.x() if QtWidgets.QApplication.isRightToLeft() else -delta.x())))
vBar.setValue(int(vBar.value() - delta.y()))
Environment
Problem
When pressing the middle mouse button in the topology view, GNS3 throws a traceback:
Traceback (most recent call last):
File ".../gns3/graphics_view.py", line 637, in mouseMoveEvent
hBar.setValue(hBar.value() + (delta.x() if QtWidgets.QApplication.isRightToLeft() else -delta.x()))
TypeError: setValue(self, a0: int): argument 1 has unexpected type 'float'
Same for vertical scroll at line 639:
File ".../gns3/graphics_view.py", line 639, in mouseMoveEvent
vBar.setValue(vBar.value() - delta.y())
TypeError: setValue(self, a0: int): argument 1 has unexpected type 'float'
Root cause
PyQt's
setValue()expectsint, butdelta.x()anddelta.y()returnfloatin Python 3.13.Proposed fix
Wrap arguments in
int():hBar.setValue(int(hBar.value() + (delta.x() if QtWidgets.QApplication.isRightToLeft() else -delta.x())))
vBar.setValue(int(vBar.value() - delta.y()))