tkzgeom
tkzgeom copied to clipboard
TypeError while running app (using make)
Hi, thanks for this promising app.
I am trying to test with the app however, when I issue make, the app does launch however upon any interaction other than opening menus (e.g. put a point in the grid or import an example file), it crashes with following log:
~/D/tkzgeom main make
python3 src/Main.py
[]
here
here
0
Traceback (most recent call last):
File "/home/mizho/Desktop/tkzgeom/src/EuclMainWindow.py", line 100, in <lambda>
self.ui.listWidget.itemSelectionChanged.connect(lambda: listWidget_current_row_changed_func(self))
File "/home/mizho/Desktop/tkzgeom/src/ConnectSignal/Lambda.py", line 106, in listWidget_current_row_changed_func
fill_all_fields(main_window.scene)
File "/home/mizho/Desktop/tkzgeom/src/Fill/FillAll.py", line 12, in fill_all_fields
fill_point_fields(scene)
File "/home/mizho/Desktop/tkzgeom/src/Fill/FillPoint.py", line 37, in fill_point_fields
scene.ui.point_inner_sep_slider.setValue(point["marker"]["inner_sep"])
TypeError: setValue(self, int): argument 1 has unexpected type 'float'
make: *** [Makefile:2: main] Aborted (core dumped)
I'm using archlinux and here are my python packages:
- python-pillow 9.2.0-1
- python-pygments 2.12.0-1
- python-pyqt5 5.15.7-1
- python-1.8.2-1
I also test this in virtualenv using pip -r requirement.txt for exact version but got the same error.
p.s. Is it possible to provide a wheel or setup.py build system instead? It facilitate easier PKGBUILD and installation process.
Thank you for your interest and for providing the above information about the app.
I can't replicate this issue, but my best guess is that your Python version vs PyQt5 version doesn't work together as they do on my computer.
The issue is in the setValue method from Qt: https://doc.qt.io/qt-6/qabstractslider.html#public-slots.
This method expects an integer type, but since the Python wrapper of Qt on my computer didn't raise issues and worked as expected, I assumed it accepted float as well.
If this is the only problem, that's an easy fix, I have to add integer conversion for all setValue usages (there are many).
I'll do this fix soon, and will let you know.
p.s. I've never done a build system before but will have a look (but can't promise).