Python function errors in Qtdragon with Linuxcnc 2.9
18 Jul 2022 00:59 #247616
by Eyecon
Python function errors in Qtdragon with Linuxcnc 2.9 was created by Eyecon
I have a fresh install from a compiled linuxcnc 2.9 downloaded a couple of days ago. When I try to use the QTDragon sim examples or with any of my INI files, the interface launches but I get a lot of python3 errors related to drawing functions pop up. Like the below:
Traceback (most recent call last):File "/usr/lib/python3/dist-packages/qtvcp/widgets/round_gauge.py", line 53, in paintEventself.draw_background(painter, event, w)File "/usr/lib/python3/dist-packages/qtvcp/widgets/round_gauge.py", line 69, in draw_backgroundfp = QPoint(center.x() - w/4, center.y() - w/4)TypeError: arguments did not match any overloaded call:QPoint(): too many argumentsQPoint(int, int): argument 1 has unexpected type 'float'QPoint(QPoint): argument 1 has unexpected type 'float'
OR
Traceback (most recent call last):File "/usr/lib/python3/dist-packages/qtvcp/widgets/simple_widgets.py", line 567, in paintEventself.paintIndicator()File "/usr/lib/python3/dist-packages/qtvcp/widgets/simple_widgets.py", line 609, in paintIndicatorp.drawEllipse(x, y, self._diameter - 1, self._diameter - 1)TypeError: arguments did not match any overloaded call:drawEllipse(self, QRectF): argument 1 has unexpected type 'float'drawEllipse(self, QRect): argument 1 has unexpected type 'float'drawEllipse(self, int, int, int, int): argument 1 has unexpected type 'float'drawEllipse(self, Union[QPointF, QPoint], float, float): argument 1 has unexpected type 'float'drawEllipse(self, QPoint, int, int): argument 1 has unexpected type 'float'
Any ideas?
Traceback (most recent call last):File "/usr/lib/python3/dist-packages/qtvcp/widgets/round_gauge.py", line 53, in paintEventself.draw_background(painter, event, w)File "/usr/lib/python3/dist-packages/qtvcp/widgets/round_gauge.py", line 69, in draw_backgroundfp = QPoint(center.x() - w/4, center.y() - w/4)TypeError: arguments did not match any overloaded call:QPoint(): too many argumentsQPoint(int, int): argument 1 has unexpected type 'float'QPoint(QPoint): argument 1 has unexpected type 'float'
OR
Traceback (most recent call last):File "/usr/lib/python3/dist-packages/qtvcp/widgets/simple_widgets.py", line 567, in paintEventself.paintIndicator()File "/usr/lib/python3/dist-packages/qtvcp/widgets/simple_widgets.py", line 609, in paintIndicatorp.drawEllipse(x, y, self._diameter - 1, self._diameter - 1)TypeError: arguments did not match any overloaded call:drawEllipse(self, QRectF): argument 1 has unexpected type 'float'drawEllipse(self, QRect): argument 1 has unexpected type 'float'drawEllipse(self, int, int, int, int): argument 1 has unexpected type 'float'drawEllipse(self, Union[QPointF, QPoint], float, float): argument 1 has unexpected type 'float'drawEllipse(self, QPoint, int, int): argument 1 has unexpected type 'float'
Any ideas?
Please Log in or Create an account to join the conversation.
18 Jul 2022 05:10 #247634
by cmorley
Replied by cmorley on topic Python function errors in Qtdragon with Linuxcnc 2.9
Can you tell me more about your linux system?
Ot seems the drawing routines changed at some point in the pyqt libraries.
Ot seems the drawing routines changed at some point in the pyqt libraries.
Please Log in or Create an account to join the conversation.
18 Jul 2022 06:48 #247643
by Eyecon
Replied by Eyecon on topic Python function errors in Qtdragon with Linuxcnc 2.9
Running bulleye where I downloaded and compiled my own 2.9 package. All dependencies were downloaded based on the dpk tools as part building the linuxcnc deb packages. I modified all the python widgets by adding explicit type casting to int (using the int() function). This seems to have resolved the issue however I keep getting segmentation errors when I exit:
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 31034, resource id: 9583230, major code: 40 (TranslateCoords), minor code: 0
/usr/bin/linuxcnc: line 963: 17340 Segmentation fault $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 31034, resource id: 9583230, major code: 40 (TranslateCoords), minor code: 0
/usr/bin/linuxcnc: line 963: 17340 Segmentation fault $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
Please Log in or Create an account to join the conversation.
18 Jul 2022 13:05 #247660
by cmorley
Replied by cmorley on topic Python function errors in Qtdragon with Linuxcnc 2.9
yes seg error when closing sees to be a common complaint. I have npt found the answer yet, but seems harmless other then annoying.
Please Log in or Create an account to join the conversation.
25 Jul 2022 04:59 #248219
by Eyecon
Replied by Eyecon on topic Python function errors in Qtdragon with Linuxcnc 2.9
Just wanted to leave this update here: there is no need to modify any of the widget drawing function calls if using python 3.9, the issue seems to be specific to the version of the libraries of python 3.10
The following user(s) said Thank You: cmorley
Please Log in or Create an account to join the conversation.
28 Aug 2022 18:38 #250632
by Roguish
Replied by Roguish on topic Python function errors in Qtdragon with Linuxcnc 2.9
Eyecon.
if you could, check out my problem....
forum.linuxcnc.org/qtvcp/46757-qtdragon-...n-12-bookworm#250629
did you revert from python 3.10 to python 3.9 ???
if so, how ???
if you could, check out my problem....
forum.linuxcnc.org/qtvcp/46757-qtdragon-...n-12-bookworm#250629
did you revert from python 3.10 to python 3.9 ???
if so, how ???
Please Log in or Create an account to join the conversation.
28 Aug 2022 18:55 #250637
by Eyecon
Replied by Eyecon on topic Python function errors in Qtdragon with Linuxcnc 2.9
No, the culprit was the way I had my apt repos setup. Basically had it pointing to testing or unstable and during the process of install the Linuxcnc build dependencies. Python3.10 was the candidate to resolve some of the package. There was no way to revert easily, so I ended up reinstalling my build environment and stuck with the main repos from bullseye. As mentioned on the other thread, you can edit the files that have the invalid function calls with a data type override(int()) but it’s not a sustainable solution if you want to close to the master branch so I’d recommend sticking to Debian 11 and python 3.9
The following user(s) said Thank You: Roguish
Please Log in or Create an account to join the conversation.
28 Aug 2022 19:12 #250638
by Roguish
Replied by Roguish on topic Python function errors in Qtdragon with Linuxcnc 2.9
Eyecon.
thanks for the reply.
a bit too late to revert to 11.....
sounds like Cmorley is going to look into more...
thanks for the reply.
a bit too late to revert to 11.....
sounds like Cmorley is going to look into more...
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.084 seconds